[Python-Dev] PEP 492 vs. PEP 3152, new round (original) (raw)

Yury Selivanov yselivanov.ml at gmail.com
Thu Apr 30 02:05:51 CEST 2015


Nathaniel,

On 2015-04-29 7:58 PM, Nathaniel Smith wrote:

On Wed, Apr 29, 2015 at 4:48 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:

Nathaniel,

On 2015-04-29 7:35 PM, Nathaniel Smith wrote: What I do feel strongly about is that whatever syntax we end up with, there should besome accurate human-readable description ofwhat it is. AFAICT the PEP currently doesn't have that. How to define human-readable description of how unary minus operator works? Hah, good question :-). Of course we all learned how to parse arithmetic in school, so perhaps it's a bit cheating to refer to that knowledge. Except of course basically all our users do have that knowledge (or else are forced to figure it out anyway). So I would be happy with a description of "await" that just says "it's like unary minus but higher precedence". Even if we put aside our trained intuitions about arithmetic, I think it's correct to say that the way unary minus is parsed is: everything to the right of it that has a tighter precedence gets collected up and parsed as an expression, and then it takes that expression as its argument. Still pretty simple.

Well, await is defined exactly like that ;)

Anyways, I'll follow Guido's suggestion to define await in the PEP the same way we define other syntax in python docs.

Yury



More information about the Python-Dev mailing list