Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:

One other thought:  The use of list comprehensions (a.k.a. list displays) and 
generator expressions has made many functional tools less necessary than ever.

   # preferred over map(pow, repeat(2), range(5))
   [pow(2, x) for x in range(5)]

   # preferred over map(flip, dict.items())
   [(v, k) for k, v in mydict.items()]

The list comprehension and genexp styles are much more flexible and works well 
with default arguments, constants, and using a combination of features:

   # hard to do with functionals
   [f(g(2,x), h(x, 3, y, flag=True)) for x, y in zip(X, Y) if x>y//2]

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11011>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to