4 ms·
This may surprise you, but using lambda is considered a sign of bad programming practice in Python. In general, this whole thread completely misses the point P
by toxik 5y ago
This may surprise you, but using lambda is considered a sign of bad programming practice in Python.
In general, this whole thread completely misses the point Python makes. Do not invite “clever” language (ab)use. Do the straightforward thing.
- cutler 5y ago> This may surprise you, but using lambda is considered a sign of bad programming practice in Python Only by its BDFL. Most languages consider lambdas to be first class so why not let the user decide?
- toxik 5y agoBecause the user makes poor choices, that’s the point - don’t do the clever thing, do the straightforward thing. Lambdas are discouraged in Python, and that’s not just something Guido van Rossum thinks (who, by the way, is not BDFL - there is none anymore and there hasn’t been for a long time now.)
- cutler 5y agoIf lambdas are clever then so is most Node.js code. Guido may have stepped down but he was responsible for this "Pythonic" attitude to lambdas. It's like the Python community is parodying Matz with "Guido hates FP therefore we hate FP".