This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Amaury.Forgeot.d'Arc, amaury.forgeotdarc, brian.curtin, casevh, ced, eric.smith, eric.snow, jjconti, mark.dickinson, pitrou, rhettinger, skrah, vstinner
Date 2012-02-16.22:25:52
SpamBayes Score 8.96956e-09
Marked as misclassified No
Message-id <>
In-reply-to <>
STINNER Victor <> wrote:
> decimal.Decimal.__truediv__() has an optional context argument, whereas _decimal defines PyNumberMethods.

Regarding the special methods: uses the optional context arguments
for convenience so that these methods can be re-used in other places.

I wouldn't consider this context argument as part of the API.

> decimal.Decimal.quantize() second argument is optional and its default value
> is None, but if I pass None to _decimal.Decimal.quantize(), I get a TypeError
> because _decimal expects an integer.

About this I'm not sure. I think type errors are a courtesy to the user.
Look what is possible now in


But here the argument might well be made for accepting None (and only
None apart from rounding modes). - I hope Mark and Raymond will give
their opinions, too.
Date User Action Args
2012-02-16 22:25:53skrahsetrecipients: + skrah, rhettinger, amaury.forgeotdarc, mark.dickinson, pitrou, vstinner, casevh, eric.smith, jjconti, ced, brian.curtin, Amaury.Forgeot.d'Arc, eric.snow
2012-02-16 22:25:53skrahlinkissue7652 messages
2012-02-16 22:25:52skrahcreate