[Python-Dev] PEP 492 vs. PEP 3152, new round (original) (raw)
Yury Selivanov yselivanov.ml at gmail.com
Wed Apr 29 20:46:14 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 492 vs. PEP 3152, new round
- Next message (by thread): [Python-Dev] PEP 492 vs. PEP 3152, new round
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Ethan,
On 2015-04-29 2:32 PM, Ethan Furman wrote:
On 04/29, Yury Selivanov wrote:
On 2015-04-29 1:25 PM, Ethan Furman wrote:
cannot also just work and be the same as the parenthesized version. Because it does not make any sense. I obviously don't understand your position that "it does not make any sense" -- perhaps you could explain a bit? What I see is a suspension point that is waiting for the results of coro(), which will be negated (and returned/assigned/whatever). What part of that doesn't make sense?
Because you want operators to be resolved in the order you see them, generally.
You want '(await -fut)' to:
- Suspend on fut;
- Get the result;
- Negate it.
This is a non-obvious thing. I would myself interpret it as:
- Get fut.neg();
- await on it.
So I want to make this syntactically incorrect:
'await -fut' would throw a SyntaxError. To do what you want, write a pythonic '- await fut'.
Yury
- Previous message (by thread): [Python-Dev] PEP 492 vs. PEP 3152, new round
- Next message (by thread): [Python-Dev] PEP 492 vs. PEP 3152, new round
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]