[issue7633] decimal.py: type conversion in context methods

Mark Dickinson report at bugs.python.org
Fri Jan 29 20:03:39 CET 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

The updated patch looks good---thank you!  We're getting there... :)

I'm not sure about the extra 'Operand can be Decimal or int.' in the method docstrings;  this just looks like extra clutter to me.  Rather, I think it would be a surprise worthy of documentation if these methods *didn't* accept int or long;  since they now do (with your patch), I don't think it's really worth mentioning in the docstring.  And it's not quite accurate, either, since these methods should accepts longs as well as ints (and bools, and instances of other subclasses).

Would you be content to remove these from the docstrings?  Or do others monitoring this issue think they should stay?

The extra doctests and test_decimal tests are nice.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7633>
_______________________________________


More information about the Python-bugs-list mailing list