if <assignment>:

Isaac To kkto at csis.hku.hk
Wed Nov 27 22:51:51 EST 2002


>>>>> "Courageous" == Courageous  <jkraska at san.rr.com> writes:

    >> This is a special case of the general principle that it's usually
    >> clearer if expressions don't have side effects.

    Courageous> Oh, quite true! As a general rule of thumb, I consider
    Courageous> expressions with side effects to be bad coding practice.  I
    Courageous> don't mind at all that Python doesn't allow them.

How about if Python disallow functions to do anything "with a side effect"?
After all, function calls are expressions.

Regards,
Isaac.



More information about the Python-list mailing list