Steven D'Aprano steve+comp.lang.python at
Thu Mar 6 01:35:33 CET 2014

On Thu, 06 Mar 2014 08:26:22 +1100, Chris Angelico wrote:

> On Thu, Mar 6, 2014 at 8:14 AM, Marko Rauhamaa <marko at> wrote:
>> When I talk about an object's memory address, I'm not referring to what
>> might be revealed by gdb, for example. That is, I'm not talking about
>> the process's virtual address space, nor am I talking about the
>> physical address on the address bus. I can simply define that the
>> object's memory address is whatever id() returns.
> Where's the complaints about circularity now? You're saying "But of
> course id() returns the address, as long as we define the address as
> 'whatever id() returns'.". Unimpeachably logical and utterly unhelpful.

That last sentence is wrong. There is nothing logical about just making 
up arbitrary definitions in this way. He could invent *any* definition, 
each more ridiculous than the last:

- it's the object's memory address;

- it's the object's phone number;

- it's the number of baby elephants killed by the object;

- it's the number of intergalactic empires that are, even as we 
  speak, rushing to Earth to invade to gain possession of that

- it's the weight in metric tonnes of the electrons in the object;

  (Not *actual* electrons of course, just these arbitrary inventions 
  of Marko's definition.)

- it's the length measured in seconds of the bitterness of the 
  object's kidney;

and of course:

- the number of angels that can dance on the object.

Steven D'Aprano

More information about the Python-list mailing list