Modifying Class Object
wuwei23 at gmail.com
Mon Feb 8 04:18:33 CET 2010
"Alf P. Steinbach" <al... at start.no> wrote:
> Hm. While most everything I've seen at effbot.org has been clear and to the
> point, that particular article reads like a ton of obfuscation.
Must. Resist. Ad hominem.
> Python passes pointers by value, just as e.g. Java does.
> There, it needed just 10 words or so. :-)
10 words _plus_ an understanding of Java. Do you really think its
appropriate to discuss Python's behaviour purely in terms of other
Further, you've managed to define Python's behaviour as being somehow
_both_ of the major evaluation strategies - calling a reference by
value - so you're asking people to understand two totally irrelevant
models just to avoid describing one in its own terms. Rather than
arguing about whether you have a 'value' or a 'reference', it's a lot
easier to explain that you're passing mutable & immutable objects
around. The behaviour is thus defined in terms of the object and _not_
in the calling model, and is far more consistent with object
references throughout the language. It also doesn't require reference
to other languages simply to define Python's model in terms of what it
More information about the Python-list