Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19267

Re: access address from object and vice versa

From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: access address from object and vice versa
Date 2012-01-23 15:54 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <jfjvrs$1vc$2@reader1.panix.com> (permalink)
References <4F1B7CA8.80702@googlemail.com> <mailman.4917.1327203395.27778.python-list@python.org> <4f1ba400$0$29987$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


On 2012-01-22, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> On Sat, 21 Jan 2012 19:36:32 -0800, Chris Rebert wrote:
>
>> On Sat, Jan 21, 2012 at 7:04 PM, Tamer Higazi <th982a@googlemail.com>
>> wrote:
>>> Hi people!
>>> I have asked myself the following thing.
>>>
>>> How do I access the address of an object
>> 
>> id(obj) happens to do that in CPython, but it's a mere implementation
>> detail.
>
> I really wish that CPython didn't expose the fact that id happens to use 
> address. That simply gives people the wrong idea.
>
> Jython has the right approach, in my opinion. Objects are given IDs on 
> request, starting with 1, and no id is ever re-used:

But what happens when Jython runs out of numbers?!?!

-- 
Grant Edwards               grant.b.edwards        Yow! I threw up on my
                                  at               window!
                              gmail.com            

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: access address from object and vice versa Chris Rebert <clp2@rebertia.com> - 2012-01-21 19:36 -0800
  Re: access address from object and vice versa Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-22 05:52 +0000
    Re: access address from object and vice versa Duncan Booth <duncan.booth@invalid.invalid> - 2012-01-23 09:36 +0000
    Re: access address from object and vice versa Grant Edwards <invalid@invalid.invalid> - 2012-01-23 15:54 +0000

csiph-web