[Python-Dev] ',' precedence in documentation

Stefan Rank list-ener at strank.info
Mon Sep 15 09:42:11 CEST 2008


on 15.09.2008 06:12 Guido van Rossum said the following:
> On Sun, Sep 14, 2008 at 8:55 PM, Leif Walsh <leif.walsh at gmail.com> wrote:
>> On Sun, Sep 14, 2008 at 11:36 PM, Eric Smith <eric at trueblade.com> wrote:

>>>  assert B as S

>> Personally, I like 'else' better than 'as', because 'as' seems to
>> contain the notion of assignment.

> That's my gut feeling too, but I don't like 'else' all that much
> either (if would also make things like"assert x if t else b, msg" less
> readable I think). Maybe "assert B with S"???
> 
> FWIW I don't like turning it into a function either, and I *really*
> don't like keeping the keyword but changing the syntax to be
> function-like.

FWIW, Java's assert syntax is::

   assert Expression1 : Expression2 ;

which I regularly tried to write in Python when I started with it...
(minus the semicolon of course)



More information about the Python-Dev mailing list