[docs] [issue25735] math.factorial doc should mention integer return type

Mark Dickinson report at bugs.python.org
Sat Nov 28 09:29:08 EST 2015


Mark Dickinson added the comment:

[Terry]

>>> factorial(decimal.Decimal(5.2))
120

Yep, that's definitely wrong. If we want to behave the same way as for float, we should accept only integral Decimal values. (Though I'm not much of a fan of the float behaviour: I would have preferred math.factorial not to accept floats at all.)

----------

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


More information about the docs mailing list