5 ms·
I'm still not sure that list comprehensions in Python 2 were the right move...
by mhd 5y ago
I'm still not sure that list comprehensions in Python 2 were the right move...
- makapuf 5y agothis one I love, and is very useful and clear, but I'm sure each one of the c++ features are dear to someone...
- kortex 5y agoNah, list, and even moreso, dict comprehensions, are one of my favorite python features. Any time you can avoid state-in-flight (e.g. mutating stuff inside a for loop) is a win in my book. Maybe if you aren't used to the syntax, there is some mental overhead, but that goes away after (at most) a few months of writing python.
- mhd 5y agoBack in the days, I was seeing Python basically as the anti-Perl, where "There's More Than One Way of Doing Things" is the core mantra. Sure, a for loop is a blunt tool, but there's something to be said about not having too many different ways to approach things. Python as the new Basic. Back then, that was a unique selling point of the language for me. These days, those are quite diffrent.