News for hackers. Stuff that matters.
Re:Hidden features of Python by shadytrees on Monday September 22, 2008 @02:56PM (#311484)
List comprehensions don't exist in their own vacuum though. For generators (the generalization of list comprehensions) and then coroutines, it's a feature that can't be replicated in Python without serious kludges; it does indeed add semantics. It enables you to do more: threads, actor model, state machine, modularize large functions. I think the cost of implementing list comprehensions was more than worth the while for all the benefits that have been reaped from it.
Re:Hidden features of Python by anamax on Monday September 22, 2008 @03:12PM (#311513)
Python could have had generators without having lisp comprehensions, so you don't get to use "generators good" to conclude "list comprehensions good".

List comprehensions were initially syntax for loops over generators. The current version introduces another variable scope.