[Python-Dev] Should the default equality operator compare values instead of identities?

BJörn Lindqvist bjourne at gmail.com
Mon Nov 7 14:06:11 CET 2005


How would the value equality operator deal with recursive objects?

class Foo:
    def __init__(self):
        self.foo = self

Seems to me that it would take atleast some special-casing to get
Foo() == Foo() to evalute to True in this case...

--
mvh Björn


More information about the Python-Dev mailing list