On Thu, Nov 26, 2015 at 10:12 PM, Dave Farrance <df@see.replyto.invalid> wrote: > Marko Rauhamaa <ma...@pacujo.net> wrote: > >>Dave Farrance <df@see.replyto.invalid>: >> >>> (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 figure out what I'm getting at -- i.e. I presume that the ids > are not pointers to stored numbers in memory (as with CPython) but are a > translation of the numerical variable's value.
As long as they're unique among concurrently-existing objects, that's fully compliant and not at all invalid. It might be generated in some way from its value, but that's safe as long as there's a scheme that keeps all other objects away from them. ChrisA -- https://mail.python.org/mailman/listinfo/python-list