3 ms·
Generator expressions are a nice addition to Python, but can't replace everything. It doesn't hold some properties, like partial application. In the end it's su
by hcarvalhoalves 13y ago
Generator expressions are a nice addition to Python, but can't replace everything. It doesn't hold some properties, like partial application. In the end it's sugar that works well as one-line loops, but I don't find the result elegant when you mix and match with other high-order functions, lambdas, or when nested. It turns into a prefix/postfix/infix mess.
- vog 13y ago> It turns into a prefix/postfix/infix mess. Other functional languages like Haskell handle this "mess" quite well.