[Python-Dev] ',' precedence in documentation]

Joel Bender jjb5 at cornell.edu
Mon Sep 15 23:21:27 CEST 2008


> Good sleuthing. Since you have found an inconsistency, now all the
> docs are useless?

LOL!  Hardly!  I only found one inconsistent page, and it happens to be 
one that I found a little hard to understand while I was learning the 
language.

In ALGOL it is used as part of the statement, like:

     FOR I := 1, 5 STEP 2 UNTIL 9, 12 WHILE (X < 5) DO ...

So I'm quite happy with it being an expression separator.  I would 
re-write that part of the grammar to have a tuple_display like 
list_display, but it's not worth the effort.

> But it is not -- it is the message passed to the exception constructor!

I apologize, oversimplified the statement.  I wanted to express that 
it's not just passed as a parameter to the exception constructor, but 
the fact that the exception that that is constructed is also raised in 
some circumstances.  I didn't mean to imply that the expression itself 
was raised.  IMHO, the keyword "else" wasn't strong enough.


Joel



More information about the Python-Dev mailing list