is implemented with id ?

Chris Angelico rosuav at gmail.com
Thu Sep 6 05:50:04 EDT 2012


On Thu, Sep 6, 2012 at 7:34 PM, Duncan Booth
<duncan.booth at invalid.invalid> wrote:
> Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
>
>> But at any moment, any object has a specific
>> location, and no other object can have that same location. Two objects
>> cannot both be at the same memory address at the same time.
>>
>
> It is however perfectly possible for one object to be at two or more memory
> addresses at the same time.

And of course, memory addresses have to be taken as per-process, since
it's entirely possible for two processes to reuse addresses. But I
think all these considerations of object identity are made with the
assumption that we're working within a single Python process.

ChrisA



More information about the Python-list mailing list