3 ms·
The lame anonymous functions that don't have the full power of the language are ugly. Tis true, python lambdas are lame, but in practice, their use has been mo
by MichaelSalib 16y ago
The lame anonymous functions that don't have the full power of the language are ugly.
Tis true, python lambdas are lame, but in practice, their use has been mostly superceded by list (and now set and dictionary) comprehensions.
Edit to add: Other dynamic languages have various solutions to the variable declaration problem, usually involving a parser or compiler warning when you use an unbound variable. Python's syntax would have to change to make that possible, I think.
I don't understand. If you mistype a name, you'll get an error when you run the code.
- dagw 16y agoIf you mistype a name, you'll get an error when you run the code. Depends on the context of the typo. I've had errors along the lines of bar=False ... bat=True ... if bar: print "Hi" And wondered why "Hi" was never printed. Of course the problem is hardly unique to Python.