Finding the instance reference of an object

Antoon Pardon apardon at forel.vub.ac.be
Wed Oct 29 06:38:54 EDT 2008


On 2008-10-17, Joe Strout <joe at strout.net> wrote:

>> Python's assignment semantics (as opposed to its "object handling, a
>> term for which I have no referent) are not the same as those of, say  
>> C.
>
> They are, though.  The only difference you've pointed out is that  
> *numbers* are different in Python vs. C, and that's an internal  
> implementation detail I was blissfully unaware of until this  
> discussion.  (I'm grateful to know it, but it really doesn't matter in  
> day-to-day coding.)

No they are not. An assignment in Python is like making an (new) alias/reference,
while an asignment in C is copying the content of one variable into another.

-- 
Antoon Pardon



More information about the Python-list mailing list