[issue30471] "as" keyword in comprehensions

Raymond Hettinger report at bugs.python.org
Thu May 25 22:29:58 EDT 2017


Raymond Hettinger added the comment:

As Brett says, the place to propose this is on python-ideas.  

I'm going to mark it here as closed/rejected because it will likely have to go through a lengthy process (possibly including a PEP) before having a chance of being accepted.  Please don't take this as discouragement.  It is just that the tracker is the wrong forum for the conversation to start.

On the plus side, the idea does seem like a nice convenience.  On the minus side, we really like that inconveniences serve as a nudge to not put too much inside a list comprehension and use a regular for-loop instead.  Also, Guido in the past has resisted similar suggestions for making assignments inside a while-loop conditional expression ("while (f.read(10) as block) != '': ...).

----------
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
versions: +Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30471>
_______________________________________


More information about the Python-bugs-list mailing list