This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Bernhard10, docs@python, r.david.murray
Date 2016-12-14.15:12:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481728351.33.0.596160927506.issue28973@psf.upfronthosting.co.za>
In-reply-to
Content
That fact that this is so is implicit in the name multi*process*ing and
the documented restrictions of the id function.  That is, it is the purpose of the module is to manage computation across multiple processes.  Since different processes have distinct memory spaces, you cannot depend on object identity between processes, by the definition of object identity (it is constant only for the lifetime of the object in memory, and the different processes have different memory spaces, therefore the object id may be different in the different processes).  By construction this applies also to any multiprocessing mechanism that is used to transmit objects, even if the transmission turns out to be to the same process in a particular case.  You can't *depend* on the id in that case, because the transmission mechanism must be free to change the object identity in order to work in the general case.

Should we document this explicitly?  Perhaps so.  Maybe in the multiprocessing introduction?
History
Date User Action Args
2016-12-14 15:12:31r.david.murraysetrecipients: + r.david.murray, docs@python, Bernhard10
2016-12-14 15:12:31r.david.murraysetmessageid: <1481728351.33.0.596160927506.issue28973@psf.upfronthosting.co.za>
2016-12-14 15:12:31r.david.murraylinkissue28973 messages
2016-12-14 15:12:30r.david.murraycreate