On Sat, 10 Aug 2013 16:42:22 -0400, Roy Smith wrote: > In article <[email protected]>, > Dennis Lee Bieber <[email protected]> wrote: > >> Because id(n) is not giving you the address of the NAME. It is giving >> you the address of the "10" > > Actually, it is giving you the id of the int(10) object. Maybe it's an > address, maybe it's not. Only your implementation knows for sure.
/steve cheers from the audience Thank you for mentioning this. Using Jython: >>> x = 10 >>> id(x) 1 And using IronPython: >>> x = 10 >>> id(x) 43 "id" does not stand for "memory address". It stands for "identity". -- Steven -- http://mail.python.org/mailman/listinfo/python-list
