PEP 308: Alternative conditional operator forms
Andrew Koenig
ark at research.att.com
Tue Feb 11 16:29:11 EST 2003
More information about the Python-list mailing list
Tue Feb 11 16:29:11 EST 2003
- Previous message (by thread): PEP 308: Alternative conditional operator forms
- Next message (by thread): PEP 308: Alternative conditional operator forms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>> if C: print x >> else: print y >> >> is correct whereas >> >> (if C: print x >> else: print y) >> >> would be a syntax error! Dave> Yes, but for at least two good reasons: multiline expressions in Dave> Python require '\' to join the lines (and this shold be no Dave> exception) and 'print' is a statement - there's no risk for Dave> hidden bugs because the code won't even compile (and that's a Dave> good thing). Multiline expressions don't require '\' to join them if the newline appears at a point where parentheses are unbalanced. -- Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
- Previous message (by thread): PEP 308: Alternative conditional operator forms
- Next message (by thread): PEP 308: Alternative conditional operator forms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list