[New-bugs-announce] [issue37109] Inacurrate documentation regarding return type of math.factorial
Antony Lee
report at bugs.python.org
Fri May 31 04:52:17 EDT 2019
New submission from Antony Lee <anntzer.lee at gmail.com>:
https://docs.python.org/3/library/math.html says
The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.
and
math.factorial(x)
Return x factorial. Raises ValueError if x is not integral or is negative.
but math.factorial returns an int (which is perfectly reasonable and just needs to be documented):
In [3]: math.factorial(5)
Out[3]: 120
----------
assignee: docs at python
components: Documentation
messages: 344039
nosy: Antony.Lee, docs at python
priority: normal
severity: normal
status: open
title: Inacurrate documentation regarding return type of math.factorial
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37109>
_______________________________________
More information about the New-bugs-announce
mailing list