Re: Object identity has no necessary connection to memory location

2015-11-26 Thread Steven D'Aprano
On Fri, 27 Nov 2015 07:00 am, Ben Finney wrote: > Dave Farrance writes: > >> >> >Dave Farrance : >> >> > >> >> >> (Conversely, I see that unlike CPython, all PyPy's numbers have >> >> >> unchanging ids, even after exiting PyPy and restarting, so it seems >> >> >> that PyPy's numerical ids are "f

Re: Object identity has no necessary connection to memory location

2015-11-26 Thread Mark Lawrence
On 26/11/2015 20:00, Ben Finney wrote: Dave Farrance writes: Dave Farrance : (Conversely, I see that unlike CPython, all PyPy's numbers have unchanging ids, even after exiting PyPy and restarting, so it seems that PyPy's numerical ids are "faked".) Hence https://en.wikipedia.org/wiki/Scar

Re: Object identity has no necessary connection to memory location

2015-11-26 Thread Ben Finney
Dave Farrance writes: > >> >Dave Farrance : > >> > > >> >> (Conversely, I see that unlike CPython, all PyPy's numbers have > >> >> unchanging ids, even after exiting PyPy and restarting, so it seems > >> >> that PyPy's numerical ids are "faked".) > > Hence > > https://en.wikipedia.org/wiki/Scare_

Re: Object identity has no necessary connection to memory location

2015-11-26 Thread Antoon Pardon
Op 26-11-15 om 12:49 schreef Chris Angelico: > I can't remember which language it was (maybe Lua?), but I know > there's one that uses a machine word to store either a pointer to a > heap object, or an integer of at most one less bit than the machine > word, represented by 2*n+1. I think that was

Re: Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?)

2015-11-26 Thread Chris Angelico
On Thu, Nov 26, 2015 at 10:24 PM, Ben Finney wrote: > Dave Farrance writes: > >> Marko Rauhamaa wrote: >> >> >Dave Farrance : >> > >> >> (Conversely, I see that unlike CPython, all PyPy's numbers have >> >> unchanging ids, even after exiting PyPy and restarting, so it seems >> >> that PyPy's num

Re: Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?)

2015-11-26 Thread Dave Farrance
Ben Finney wrote: >Dave Farrance writes: > >> Marko Rauhamaa wrote: >> >> >Dave Farrance : >> > >> >> (Conversely, I see that unlike CPython, all PyPy's numbers have >> >> unchanging ids, even after exiting PyPy and restarting, so it seems >> >> that PyPy's numerical ids are "faked".) >> > >> >

Object identity has no necessary connection to memory location (was: What is a function parameter =[] for?)

2015-11-26 Thread Ben Finney
Dave Farrance writes: > Marko Rauhamaa wrote: > > >Dave Farrance : > > > >> (Conversely, I see that unlike CPython, all PyPy's numbers have > >> unchanging ids, even after exiting PyPy and restarting, so it seems > >> that PyPy's numerical ids are "faked".) > > > >What's a faked id? > > You can