Skip to content

Commit b332cb6

Browse files
committed
fix math.factorial documentation
1 parent 56b78c4 commit b332cb6

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Doc/library/math.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ Number-theoretic functions
144144

145145
.. function:: factorial(n)
146146

147-
Return *n* factorial as an integer. Raises :exc:`TypeError` if *n* is not integral or
148-
is negative.
147+
Return *n* factorial as an integer.
149148

150149
.. versionchanged:: 3.10
151150
Floats with integral values (like ``5.0``) are no longer accepted.

Modules/clinic/mathmodule.c.h

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/mathmodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,12 +2009,11 @@ math.factorial
20092009
20102010
Find n!.
20112011
2012-
Raise a ValueError if x is negative or non-integral.
20132012
[clinic start generated code]*/
20142013

20152014
static PyObject *
20162015
math_factorial(PyObject *module, PyObject *arg)
2017-
/*[clinic end generated code: output=6686f26fae00e9ca input=713fb771677e8c31]*/
2016+
/*[clinic end generated code: output=6686f26fae00e9ca input=06200bf38384f7ae]*/
20182017
{
20192018
long x, two_valuation;
20202019
int overflow;

0 commit comments

Comments
 (0)