Explanation of list reference
rustompmody at gmail.com
Sat Feb 15 07:31:16 CET 2014
On Saturday, February 15, 2014 11:49:38 AM UTC+5:30, Ben Finney wrote:
> Rustom Mody 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?
Are you explaining or defining identity?
As an explanation its ok though a bit tautologous
As a definition its circular
[Just for context remember the OP -- a noob father-son duo confused by
python's memory model]
> > 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.
Hard as a nail the problem persists -- Non-promise of identity implies we
> \ "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