[Python-Dev] PEP 550 v4 (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Tue Aug 29 19:36:41 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 550 v4
- Next message (by thread): [Python-Dev] PEP 550 v4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yury Selivanov wrote:
While we want "yield from" to have semantics close to a function call,
That's not what I said! I said that "yield from foo()" should have semantics close to a function call. If you separate the "yield from" from the "foo()", then of course you can get different behaviours.
But that's beside the point, because I'm not suggesting that generators should behave differently depending on when or if you use "yield from" on them.
For (1) we want the context change to be isolated. For (2) you say that the context change should propagate to the caller.
No, I'm saying that the context change should always propagate to the caller, unless you do something explicit within the generator to prevent it.
I have some ideas on what that something might be, which I'll post later.
-- Greg
- Previous message (by thread): [Python-Dev] PEP 550 v4
- Next message (by thread): [Python-Dev] PEP 550 v4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]