[Python-Dev] Tricky way of of creating a generator via a comprehension expression (original) (raw)
Ivan Levkivskyi levkivskyi at gmail.com
Fri Nov 24 20:04:38 EST 2017
- Previous message (by thread): [Python-Dev] Tricky way of of creating a generator via a comprehension expression
- Next message (by thread): [Python-Dev] Tricky way of of creating a generator via a comprehension expression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 25 November 2017 at 01:22, Guido van Rossum <guido at python.org> wrote:
The more I hear about this topic, the more I think that
await
,yield
andyield from
should all be banned from occurring in all comprehensions and generator expressions. That's not much different from disallowingreturn
orbreak
.IIUC this would essentially mean rejecting PEP 530. What do you think about banning
await
,yield
andyield from
only from generator expressions? Comprehensions can be fixed (just make them equivalent to for-loops without leaks as discussed).
-- Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171125/cc6acdd0/attachment.html>
- Previous message (by thread): [Python-Dev] Tricky way of of creating a generator via a comprehension expression
- Next message (by thread): [Python-Dev] Tricky way of of creating a generator via a comprehension expression
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]