An unusual question...
Rhodri James
rhodri at wildebst.demon.co.uk
Mon Apr 18 18:42:00 EDT 2011
On Mon, 18 Apr 2011 08:01:00 +0100, <wisecracker at tesco.net> wrote:
> Hi Rhodri...
>
>> You do realise that what id() returns is implementation-dependent, don't
>> you? In particular, what IronPython returns isn't an address.
>
> I'm pretty sure I wrote "standard Python" install in one of my replies.
>
> Yeah here it is in a reply to Miki...
>
> "Hmm, I was hoping to stay inside a standard Python install."
IronPython *is* a standard Python install. So is CPython, the one I
presume you mean. Even that doesn't offer you any guarantee that it isn't
going to change what id() returns from one version to the next. Relying
on implementation-defined behaviour like this is a good way of getting
code to blow up in your face. You'll get much more reliable results by
starting in a language that was actually intended for direct memory
access, like C, and wrapping that in Python.
--
Rhodri James *-* Wildebeest Herder to the Masses
More information about the Python-list
mailing list