Explanation of list reference

Marko Rauhamaa marko at pacujo.net
Sat Feb 15 11:13:54 CET 2014


Marko Rauhamaa <marko at pacujo.net>:

>   1. if x is y then y ix x
>   2. if x is y and y is z then x is z
>   3. after x = y, x is y
>   4. if x is y, then x == y

A new attempt:

   0. x is x
   1. if x is y then y ix x
   2. if x is y and y is z then x is z
   3. after x = y, x is y
   4. if x is y and x == x, then x == y
   5. id(x) == id(y) iff x is y

Does that cover it?


Marko



More information about the Python-list mailing list