Ben Finney <ben+pyt...@benfinney.id.au>: > Marko Rauhamaa <ma...@pacujo.net> writes: >> 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. > > Then this does not count as a leaky abstraction. All you're saying is > that the ‘id(foo)’ result is a representation of the object identity, > which is entirely at the level of the abstraction. Nothing is leaked.
I wasn't making a point about a leaky abstraction. I was just saying talking about id() as a memory address isn't all that bad. It's a bit like rolling down your power windows or turning up the volume, when there's nothing to roll or turn. There's no risk of getting your program wrong. Marko -- https://mail.python.org/mailman/listinfo/python-list