[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Brett Cannon
Brett Cannon added the comment: I've created https://github.com/python/peps/pull/267 to clarify things a bit better in PEP 42, Dávid . -- ___ Python tracker

[issue30471] "as" keyword in comprehensions

2017-05-26 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: The truth is, I was thinking about going to the list, but according to PEP 42 (https://www.python.org/dev/peps/pep-0042/), this space was one of the places new features could be requested: """ Note This PEP has been rejected as obsolete. All new feature

[issue30471] "as" keyword in comprehensions

2017-05-25 Thread Raymond Hettinger
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

[issue30471] "as" keyword in comprehensions

2017-05-25 Thread Brett Cannon
Brett Cannon added the comment: The best place to propose this is on the python-ideas mailing list. My suspicion, though, is people will say it's not worth the new syntax as you can also undo your comprehensions as normal code and simply assign to a variable name directly. -- nosy:

[issue30471] "as" keyword in comprehensions

2017-05-25 Thread Dávid Nemeskey
New submission from Dávid Nemeskey: Currently, the "as" keyword in supported in import and with statements to bind an object to a name. I think it would be nice to have the same functionality in list/dict/etc. comprehensions as well. Rationale: as I understand, comprehensions are preferred