4 ms·
"according to the python diagram, there is absolutely no difference except for the parameter definition between what is allowed in a normal function definition
by dalke 17y ago
"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.