'is not' or '!='

Marko Rauhamaa marko at pacujo.net
Tue Aug 19 14:52:15 EDT 2014


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

> Python identity is represented by an integer, and it is guaranteed to
> be unique and constant for the lifetime of the object. It may or may
> not be reused once the object no longer exists. That's all you need to
> know about identity; that's *all there is to know* about identity in
> Python.
>
> [...]
>
> They are not metaphysical. They are concrete. You cannot understand the
> semantics of identity in Python without understanding Python's execution
> model.

That's circular reasoning. When you are defining Python's execution
model, you can't refer back to Python's execution model.

For a good example of what I'm after, take a look how Java specifies its
crucial happens-before relation:

   <URL:
   http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.4.5>


Marko



More information about the Python-list mailing list