On Sat, Apr 28, 2012 at 3:51 AM, Adam Skutt <ask...@gmail.com> wrote: > Yes, there is a way. You add a function deref() to the language. In > CPython, that simply treats the passed value as a memory address and > treats it as an object, perhaps with an optional check. In Jython, > it'd access a global table of numbers as keys with the corresponding > objects as values, and return them. The value of id() is absolutely > an address, even in Jython. The fact the values can move about is > irrelevant.
Python already as dereferenceable addresses. Look. def address(obj,table=[]): for i,o in enumerate(table): if obj is o: return i table.append(obj) return len(table)-1 def deref(addr): return address.__defaults__[0][addr] You can take the address of an object (interning it, effectively), and later dereference it. Proves nothing. ChrisA -- http://mail.python.org/mailman/listinfo/python-list