New submission from Antony Lee <anntzer....@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@python
components: Documentation
messages: 344039
nosy: Antony.Lee, docs@python
priority: normal
severity: normal
status: open
title: Inacurrate documentation regarding return type of math.factorial
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to