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

Paul Rubin phr-n2003b at NOSPAMnightsong.com
Fri Feb 7 23:13:32 EST 2003


Jp Calderone <exarkun at intarweb.us> writes:
>   Try this one on for size:
> 
>     val = z
>     if x:
>         val = y

Again, the usual thing with side effects.

    val = z()
    if x:
       val = y()

calls both functions instead of just calling one.




More information about the Python-list mailing list