Documentation says: Raises [ValueError](https://docs.python.org/3.15/library/exceptions.html#ValueError) if n is not integral or is negative. Docstring: Raise a ValueError if x is negative or non-integral. State of art: ```pycon >>> math.factorial(1.0) Traceback (most recent call last): File "<python-input-2>", line 1, in <module> math.factorial(1.0) ~~~~~~~~~~~~~~^^^^^ TypeError: 'float' object cannot be interpreted as an integer >>> math.factorial(-1.0) Traceback (most recent call last): File "<python-input-3>", line 1, in <module> math.factorial(-1.0) ~~~~~~~~~~~~~~^^^^^^ TypeError: 'float' object cannot be interpreted as an integer >>> math.factorial(-1) Traceback (most recent call last): File "<python-input-4>", line 1, in <module> math.factorial(-1) ~~~~~~~~~~~~~~^^^^ ValueError: factorial() not defined for negative values ``` Documentation should be fixed to state, that TypeError is raised for non-integral arguments. Or just omit description of exceptions and reduce docs to: "Return factorial of the nonnegative integer n." <!-- gh-linked-prs --> ### Linked PRs * gh-133907 * gh-133913 * gh-133918 * gh-133922 <!-- /gh-linked-prs -->