iterators (was: python-dev summary)

Jeremy Hylton jeremy at alum.mit.edu
Thu Feb 15 20:10:28 EST 2001


>>>>> "EK" == Erno Kuusela <erno-news at erno.iki.fi> writes:

  EK> list comprehensions also look pretty obscure to me (compared to
  EK> the rest of python's syntax), and don't do a lot that you can't
  EK> do with map/filter now that we have lexical scoping.

I have the opposite opinion.  I think the list comprehension syntax is
often clearer and more intuitive than the equivalent map or filter
expression.  I expect more non- and novice programmers will be
familiar with set construction notation than with higher-order
functions like map.

Jeremy




More information about the Python-list mailing list