-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add math.perm() #81309
Comments
The function which returns the number of ways to choose k items from n items without repetition and without order was added in bpo-35431. This functions is always goes in pair with other function, which returns the number of ways to choose k items from n items without repetition and with order. These functions are always learned together in curses of combinatorics. Often C(n,k) is determined via P(n,k) (and both are determined via factorial).
The proposed PR adds meth.perm(). It shares most of the code with math.comb(). |
+0 from me. It is inevitable that this will be requested now that we have comb(). The need for this is much less though. |
Exactly my thoughts, too. I don't think I'll have any use for The good part is that now that we have math.comb, I think everything about the API of math.perm is already clear (including what to call it). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: