[Python-ideas] PEP-3150

Carl M. Johnson cmjohnson.mailinglist at gmail.com
Wed Apr 13 05:17:06 CEST 2011

Can we start a new thread just for discussion of PEP-3150? I
personally don't like any of the proposals to add assignment to list
comprehensions/generator expressions and I think that no matter how
it's spelt the idea is a misfeature since there's no need to cram more
info into a one-liner list comp/gen ex, but I do find the given-clause
very interesting and potentially useful. In terms of positives for the
feature, assignment in a list comp/gen ex has the potential to save a
few characters and maybe be more readable (although I haven't seen any
proposal that strikes me as more readable yet), but PEP-3150 has the
four different benefits listed previously by Nick, most notably that
it creates a temporary namespace (a honking great idea!). So, it
strikes me that the two issues are different enough that it might be
useful to separate the discussions out.

More information about the Python-ideas mailing list