Why the statement (foo .__ init__ is foo .__ init__) returns false

code:

class Foo(object): pass foo = Foo() foo.__init__ == foo.__init__ #return true foo.__init__ is foo.__init__ #return false 

I understand that foo.__init__ == foo.__init__ returns True . Why foo.__init__ is foo.__init__ return False ?

+6
source share

All Articles