Finding the instance reference of an object

Grant Edwards invalid at invalid
Wed Oct 29 09:28:43 EDT 2008


On 2008-10-29, Antoon Pardon <apardon at forel.vub.ac.be> wrote:
> 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.

That's been pointed out over and over and over, but some people
seem unable or unwilling to grasp the difference.

-- 
Grant Edwards                   grante             Yow! Someone in DAYTON,
                                  at               Ohio is selling USED
                               visi.com            CARPETS to a SERBO-CROATIAN



More information about the Python-list mailing list