[Python-ideas] filter-only list comps
Fred Drake
fdrake at acm.org
Thu Feb 25 15:20:56 CET 2010
On Thu, Feb 25, 2010 at 8:45 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Even aside from the interpreter parsing problem, there's actually a more
> important human parsing problem.
Another human parsing problem is this:
x = [(k, v) in somedict.items() if condition(v)]
What should be stored in the result? While we can decide what it
should be, it's not blindingly obvious for a reader.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller
More information about the Python-ideas
mailing list