[Python-Dev] Decimal & returning NotImplemented (or not)
python at rcn.com
Tue Mar 1 14:22:51 CET 2005
> A recent question on c.l.p pointed out that the 2.4 Decimal
> raises TypeError directly for operator arguments it doesn't
> of returning NotImplemented.
> Obviously, this creates problems for anyone trying to define a class
> nicely' with Decimal (but does not inherit from Decimal), since their
> methods never get called - Decimal's TypeError gets in the way.
Try to address this in a larger context than decimal. The same sort of
logic is present in sets.py and in datetime objects.
More information about the Python-Dev