if <assignment>:
Greg Ewing
see_reply_address at something.invalid
Thu Nov 28 17:04:05 EST 2002
Isaac To wrote:
>
> How about if Python disallow functions to do anything "with a side effect"?
> After all, function calls are expressions.
Technically, yes, but all that means is that the
Python grammar doesn't make some distinctions that
I nevertheless make in my brain when I'm coding.
When I write a statement, I tend to think of it
as either something to be evaluated (expression)
or a command to do something (procedure call or
assignment).
A statement which starts out looking like one of
these and part way through changes into the other
can be confusing.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list