id == vs is

Denis McMahon denismfmcmahon at gmail.com
Sun Oct 26 21:47:40 EDT 2014


On Sun, 26 Oct 2014 17:12:29 -0700, Dan Stromberg wrote:

> Are the following two expressions the same?
> 
> x is y
> 
> Id(x) == id(y)

No, although if "Id" and "id" were the same function, they might be 
equivalent in some cases. 

-- 
Denis McMahon, denismfmcmahon at gmail.com



More information about the Python-list mailing list