Skip to content

Commit 1ba82d4

Browse files
authored
Change parameter name from *x* for reals to *n* for integers. (GH-32377)
1 parent 32b3387 commit 1ba82d4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Doc/library/math.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Number-theoretic and representation functions
6666
Return the absolute value of *x*.
6767

6868

69-
.. function:: factorial(x)
69+
.. function:: factorial(n)
7070

71-
Return *x* factorial as an integer. Raises :exc:`ValueError` if *x* is not integral or
71+
Return *n* factorial as an integer. Raises :exc:`ValueError` if *n* is not integral or
7272
is negative.
7373

7474
.. deprecated:: 3.9

Modules/clinic/mathmodule.c.h

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

Modules/mathmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,17 +2093,17 @@ static const unsigned long SmallFactorials[] = {
20932093
/*[clinic input]
20942094
math.factorial
20952095
2096-
x as arg: object
2096+
n as arg: object
20972097
/
20982098
2099-
Find x!.
2099+
Find n!.
21002100
21012101
Raise a ValueError if x is negative or non-integral.
21022102
[clinic start generated code]*/
21032103

21042104
static PyObject *
21052105
math_factorial(PyObject *module, PyObject *arg)
2106-
/*[clinic end generated code: output=6686f26fae00e9ca input=6d1c8105c0d91fb4]*/
2106+
/*[clinic end generated code: output=6686f26fae00e9ca input=713fb771677e8c31]*/
21072107
{
21082108
long x, two_valuation;
21092109
int overflow;

0 commit comments

Comments
 (0)