Jeffrey Yasskin <jyass...@gmail.com> added the comment: The fallback behavior in Fraction was meant to demonstrate the suggested fallback behavior for user-defined types. In particular, the idea was that all Reals would (by default) be comparable to each other, even if they didn't know about each other. Unfortunately, the comparison protocol provides no way to know if a particular call is the first call or the fallback, so __eq__(Fraction, b) has to return the same thing as __eq__(b, Fraction). If b doesn't know about Fraction, and Fraction wants to make a best attempt at comparing to it, then __eq__(Fraction, b) can't return NotImplemented.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6431> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com