On 10月24日, 下午12时51分, [EMAIL PROTECTED] wrote: > Hi,I have a strange idea:is there any way to get memory address of a > object. > > For example: > > i = 10 > > addr = get_address(i) > address will be assigned a integer which is pointer of object > i,then I want to recast addr into another integer: > > j = cast(addr,<type int>) > > I think it is easy to get it by modifying source code of python,but I > would like to know if there was an existing one. > > many thanks
maybe id(x) can get it ,but how to cast it back into a object -- http://mail.python.org/mailman/listinfo/python-list