Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"according to the python diagram, there is absolutely no difference except for the parameter definition between what is allowed in a normal function definition and a lambda expression"

They both point to the parameter definition, but lambda sits under "test" and refers back to "test" while the normal function definition sits under "compound_stmt" and also points to "suite."

Those are rather big differences, and reflect rather well that while perhaps semantically they are similar, syntactically speaking they are very different.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: