On 7/19/20 4:30 PM, Thomas Moreau wrote:
> Dear all,
>
> While it would be nice to have simpler identifiers for objects, it
> would be hard to make it work for multiprocessing, as objects in
> different interpreter would end up having the same repr. Shared
> objects (locks) might also have different serial numbers depending on
> how many objects have been created before it is communicated to the
> child process.
>
> regards
> Thomas
>
>
My guess is that these numbers are the 'id()' of the object, which as an
implementation detail in CPython is the object address. If some other
method was chosen for generating the object id, then by necessity, there
would need to be a method to let multiple interpreters keep the number
unique, perhaps some bits being reserved for an interpreter id, and the
rest be a serial number.

-- 
Richard Damon
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/ZUEK3LQ2PBGXG4KZ2466EDNIDGNLAWR2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to