On Fri, Oct 24, 2008 at 2:51 PM, <[EMAIL PROTECTED]> wrote: > Hi,I have a strange idea:is there any way to get memory address of a > object.
id(obj) Example: >>> x = 10 >>> id(x) 134536908 But this probably (most likely) isn't it's address in memory but more it's unique identifier that separates it from every other object in memory. > j = cast(addr,<type int>) You can't do this in Python afaik nor would you want to. If you simply want to copy an object, do this: >>> x = 10 >>> y = x >>> id(x) 134536908 >>> id(y) 134536908 >>> cheers James -- -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list