[Python-ideas] math.inf and math.nan constants

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jan 13 04:02:12 CET 2015

On Mon, Jan 12, 2015 at 9:39 PM, Steven D'Aprano <steve at pearwood.info>

> As an alternative to float methods, perhaps the math module could be
> more polymorphic, so we could write things like (say):
> math.sqrt(some_decimal)

Something like this is trivial to implement using the singledispatch
module, but when you are faced with the functions of two arguments such as
pow, things get hairier.  What type should pow(2.5, Decimal(2)) return?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150112/c7b3fb12/attachment.html>

More information about the Python-ideas mailing list