-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Invalid error type in math.factorial sphinx docs/docstring #133904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1, clear as to what n should be, error should be expected otherwise. |
I opened PR |
The pr is automatically linked, you do not need to comment it. |
abhigyan631
added a commit
to abhigyan631/cpython
that referenced
this issue
May 12, 2025
sobolevn
added a commit
that referenced
this issue
May 12, 2025
Co-authored-by: sobolevn <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 12, 2025
(cherry picked from commit 27ed645) Co-authored-by: mkaraev <[email protected]> Co-authored-by: sobolevn <[email protected]>
This was referenced May 12, 2025
sobolevn
added a commit
that referenced
this issue
May 12, 2025
…3922) * [3.13] gh-133904: Fix `math.factorial` documentation (GH-133907) (cherry picked from commit 27ed645) Co-authored-by: mkaraev <[email protected]> Co-authored-by: sobolevn <[email protected]>
sobolevn
added a commit
that referenced
this issue
May 12, 2025
…3918) gh-133904: Fix `math.factorial` documentation (GH-133907) (cherry picked from commit 27ed645) Co-authored-by: mkaraev <[email protected]> Co-authored-by: sobolevn <[email protected]>
I think, all merged. @mkaraev, congratulations! |
@skirpichev @sobolevn thank you for your help :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation says: Raises ValueError if n is not integral or is negative.
Docstring: Raise a ValueError if x is negative or non-integral.
State of art:
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."
Linked PRs
math.factorial
documentation (GH-133907) #133918math.factorial
documentation (GH-133907) #133922The text was updated successfully, but these errors were encountered: