Explanation of list reference

Ben Finney ben+python at benfinney.id.au
Sat Feb 15 07:19:38 CET 2014

Rustom Mody <rustompmody at gmail.com> writes:

> Then you are obliged to provide some other way of understanding
> object-identity

How about: Every object has an identity, which is unique among all
concurrently-existing objects. The ‘is’ operator queries whether two
references are referring to objects with the same identity, which
implies they are actually referring to the same object.

Is that sufficient?

> I earlier talked of the macro problems of identity, viz across
> machines.

Python doesn't make any promises about object identity beyond the
current run-time of a single instance of a program. So while the problem
you describe is interesting, it isn't relevant when talking about Python
object identity.

 \        “When in doubt tell the truth. It will confound your enemies |
  `\   and astound your friends.” —Mark Twain, _Following the Equator_ |
_o__)                                                                  |
Ben Finney

More information about the Python-list mailing list