Message90582
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. |
|
Date |
User |
Action |
Args |
2009-07-16 20:36:44 | jyasskin | set | recipients:
+ jyasskin, mark.dickinson, casevh |
2009-07-16 20:36:44 | jyasskin | set | messageid: <1247776604.62.0.157032515755.issue6431@psf.upfronthosting.co.za> |
2009-07-16 20:36:43 | jyasskin | link | issue6431 messages |
2009-07-16 20:36:42 | jyasskin | create | |
|