[Python-ideas] Float range class

Devin Jeanpierre jeanpierreda at gmail.com
Fri Jan 9 04:42:32 CET 2015


On Thu, Jan 8, 2015 at 7:34 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> py> from math import factorial
> py> factorial(5.0)
> 120

This kind of grosses me out, but OK. This is sufficient as an argument
to demonstrate that math is not only for floating point math, but for
math in general. Although I still find it doubtful that we'd ever
replace, say, math.sqrt with a polymorphic sqrt -- in my head somebody
says "no, this would slow down existing Python programs by XYZ%" and
then it doesn't happen. Maybe I'm being pessimistic.

-- Devin


More information about the Python-ideas mailing list