On Fri, Mar 2, 2018 at 10:27 AM, Jelle Zijlstra <jelle.zijls...@gmail.com> wrote:
> > I wonder if we could have a more limited change to the language that would > allow only the as/while use cases. Specifically, that means we could do: > > while do_something() as x: > print(x) > The "while" case is the only part of the PEP that has any traction with me. It doesn't add any keywords, scope can be identical to "with" and it cleans up a code pattern that is very common. Every one of these comprehension examples has me scratching my head, thinking back a couple hundred (thousand? :) ) posts to Barry's quip, "Sometimes a for loop is just better" (or something along those lines).
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/