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.

Title: Inacurrate documentation regarding return type of math.factorial
Type: Stage: resolved
Components: Documentation Versions: Python 3.8
Status: closed Resolution: duplicate
Dependencies: Superseder: math.factorial doc should mention integer return type
View: 25735
Assigned To: docs@python Nosy List: cheryl.sabella, docs@python, xtreak
Priority: normal Keywords:

Created on 2019-05-31 08:52 by Antony.Lee, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg344039 - (view) Author: Antony Lee (Antony.Lee) * Date: 2019-05-31 08:52 says

The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats.


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
msg344046 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-05-31 09:23
Is this same as issue25735 ?
msg344048 - (view) Author: Antony Lee (Antony.Lee) * Date: 2019-05-31 09:29
oops, missed that, thanks for pointing that out.
msg344090 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-05-31 16:44
Thanks for pointing out the other issue.  I've now merged it.
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81290
2019-05-31 16:44:19cheryl.sabellasetnosy: + cheryl.sabella
messages: + msg344090
2019-05-31 09:57:21Antony.Leesetnosy: - Antony.Lee
2019-05-31 09:53:36xtreaksetsuperseder: math.factorial doc should mention integer return type
resolution: duplicate
2019-05-31 09:29:34Antony.Leesetstatus: open -> closed

messages: + msg344048
stage: resolved
2019-05-31 09:23:34xtreaksetnosy: + xtreak
messages: + msg344046
2019-05-31 08:52:17Antony.Leecreate