For review: PEP 308 - If-then-else expression

Skip Montanaro skip at
Fri Feb 7 20:56:15 CET 2003

    holger> What about a missing else clause? e.g. 

    holger>         <expression> if <condition>

    holger> Allowing it could be nice for stuff like 

    holger>     result = obj(...) if callable(obj)

If obj is not callable, what is assigned to result?


More information about the Python-list mailing list