2 ms·
Python uses comprehensions because whitespace sensitivity was a horrendous language decision, then couldn’t find a way to support multiline lambdas. Comprehens
by tyre 3mo ago
Python uses comprehensions because whitespace sensitivity was a horrendous language decision, then couldn’t find a way to support multiline lambdas.
Comprehensions are not a well-designed feature but a consequence of poor design.
- pjmlp 3mo agoNope, as someone there at the time, they are an influence how language like Haskell do them. Which by the way has no issues being whitespace sensitive and having multiline lambdas. The only reason Python doesn't support them is Guido not wanting to have them.
- wannabe44 3mo agoComprehensions are way cleaner and more optimizable for the common case.