why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)?

Ian Kelly ian.g.kelly at gmail.com
Tue Aug 18 01:11:43 CEST 2015

On Mon, Aug 17, 2015 at 4:57 PM, Chris Kaynor <ckaynor at zindagigames.com> wrote:
> The rules for the id is that they are only guaranteed unique during the
> lifespan of both objects. Also, generally, you do not want to use id or is
> for much of anything unless you really know what you are doing - generally,
> you just want == instead.

In the case of "is", I don't agree. "is" is a useful operator and is
not prone to user error like "id". The only caveat is that one should
understand the distinction between "is" and "==".

More information about the Python-list mailing list