BJörn Lindqvist wrote: > 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...
This is sort-of supported today: >>> a=[] >>> a.append(a) >>> b=[] >>> b.append(b) >>> a == b True Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com