To clarify how Python handles two equal objects

Roel Schroeven roel at roelschroeven.net
Sat Jan 14 21:36:29 EST 2023



Chris Angelico schreef op 15/01/2023 om 1:41:
> On Sun, 15 Jan 2023 at 11:38, Jen Kris <jenkris at tutanota.com> wrote:
> >
> > Yes, in fact I asked my original question – "I discovered something about Python array handling that I would like to clarify" -- because I saw that Python did it that way.
> >
>
> Yep. This is not specific to arrays; it is true of all Python objects.
> Also, I suspect you're still thinking about things backwards, and am
> trying to lead you to a completely different way of thinking that
> actually does align with Python's object model.
Indeen, I also still have the impression that Jen is thinking in terms 
of variables that are possible aliased such as you can have in a 
language like C, instead of objects with one or more names like we have 
in Python. Jens, in the Python model you really have to think of the 
objects largely independently of the names that are or are not 
referencing the objects.

-- 
"Ever since I learned about confirmation bias, I've been seeing
it everywhere."
         -- Jon Ronson



More information about the Python-list mailing list