Modifying Class Object
Aahz
aahz at pythoncraft.com
Sat Feb 13 10:31:03 EST 2010
In article <mailman.2323.1265836683.28905.python-list at python.org>,
Steve Holden <steve at holdenweb.com> wrote:
>
>Whether in CPython, Jython or IronPython the value returned by calling
>id(x) (whether x is a literal, a simple name or a more complex
>expression) is absolutely no use as an accessor: it does not give you
>access to the referenced value.
>
>If you disagree, please write (in any implementation you like: it need
>not even be portable, though I can't imagine why ti wouldn't be) a
>Python function which takes an id() value as its argument and returns
>the value for which the id() value was provided.
IIRC, I've seen ctypes code that uses id() to get access to the object,
but (obviously) I don't think that invalidates your point[er].
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"
More information about the Python-list
mailing list