Scope rule pecularities
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed May 12 23:02:37 EDT 2004
Antoon Pardon wrote:
>> x = 42
>> x += 1
>>
>>which is a very handy thing to be able to do.
>
> But it creates confusions because the semantics
> is not consistent.
Practicality beats purity, though, and this does seem
to be very practical.
Besides, the semantics are as consistent as anything
else in Python, where the objects being operated on
get to determine the meaning of just about everything.
--
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