Another conditional expression candidate (PEP 308)
ark at research.att.com
Mon Feb 10 06:04:53 CET 2003
Alan> Also, I think this would also be VERY confusing to new users.
Alan> This would be legal syntax:
Alan> result = if cond: x else: y
Alan> But this...
Alan> result = if cond:
Alan> ...would be illegal (it certainly is *now*, anyway). So to implement
Alan> this would require changing the fact that "if" blocks are not
Alan> expressions. Do I understand this correctly? Thanks.
Why is this any more confusing than the fact that
result = x +
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list