6 ms·
Python has as much support for closures as javascript. The only significant feature in this respect that it is missing (that I am aware of) is multi-statement,
by mikeklaas 17y ago
Python has as much support for closures as javascript. The only significant feature in this respect that it is missing (that I am aware of) is multi-statement, in-expression lambdas.
Javascript's syntactic nicety is higher there, but on balance I think python's is far superior.
Both great languages, though.
- infinite8s 17y agoAlthough python's lexical scoping is all screwed up (python 3.0's nonlocal keyword fixes this, but it is still ugly).
- baddox 17y agoLast year my Languages instructor mentioned that there was some problem or incompleteness with closures in Python because Guido didn't want to fully implement it or something. Perhaps I'm mistaken.