Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe02.ams2.POSTED!00000000!not-for-mail Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Newsgroups: comp.lang.python Subject: Re: An unusual question... References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Rhodri James" Message-ID: User-Agent: Opera Mail/11.10 (Linux) Lines: 23 NNTP-Posting-Host: 82.8.62.87 X-Complaints-To: http://netreport.virginmedia.com X-Trace: newsfe02.ams2 1303166527 82.8.62.87 (Mon, 18 Apr 2011 22:42:07 UTC) NNTP-Posting-Date: Mon, 18 Apr 2011 22:42:07 UTC Organization: virginmedia.com Date: Mon, 18 Apr 2011 23:42:00 +0100 Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3505 On Mon, 18 Apr 2011 08:01:00 +0100, 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