Jacek Generowicz wrote:
One more question. Imagine that Python had something akin to Smalltalk code blocks. Would something like
map([x | x+1], seq)
be any better for you than
map(lambda x:x+1, seq)
?
I'd say that this is very slightly better, but it's much closer (in my mind) to map/lambda than it is to a list comprehension. In this case, at least the code block is visually self-contained in a way that lambdas are not, but I still have to do more mental work to visualize the overall results than I need with list comps.
Jeff Shannon Technician/Programmer Credit International
-- http://mail.python.org/mailman/listinfo/python-list