
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-06-01 20:47 byserhiy.storchaka, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 13731 | merged | serhiy.storchaka,2019-06-01 20:49 | |
| Messages (4) | |||
|---|---|---|---|
| msg344226 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2019-06-01 20:47 | |
The function which returns the number of ways to choose k items from n items without repetition and without order was added inissue35431. 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). P(n, k) = n! / (n-k)! C(n, k) = P(n, k) / k!The proposed PR adds meth.perm(). It shares most of the code with math.comb(). | |||
| msg344227 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2019-06-01 20:49 | |
+0 from me. It is inevitable that this will be requested now that we have comb(). The need for this is much less though. | |||
| msg344228 -(view) | Author: Mark Dickinson (mark.dickinson)*![]() | Date: 2019-06-01 20:54 | |
> +0 from me. It is inevitable that this will be requested now that we have comb().Exactly my thoughts, too. I don't think I'll have any use for `math.perm`; the main reason to add it will be to satisfy all those who got taught combinations and permutations at the same time, see them as a unit, and then get surprised when they find `math.comb` without `math.perm`.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). | |||
| msg344259 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2019-06-02 08:17 | |
New changeset5ae299ac78abb628803ab7dee0997364547f5cc8 by Serhiy Storchaka in branch 'master':bpo-37128: Add math.perm(). (GH-13731)https://github.com/python/cpython/commit/5ae299ac78abb628803ab7dee0997364547f5cc8 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:16 | admin | set | github: 81309 |
| 2019-06-02 08:53:41 | serhiy.storchaka | set | resolution: fixed |
| 2019-06-02 08:53:34 | serhiy.storchaka | set | status: open -> closed stage: patch review -> resolved |
| 2019-06-02 08:17:04 | serhiy.storchaka | set | messages: +msg344259 |
| 2019-06-01 20:54:40 | mark.dickinson | set | messages: +msg344228 |
| 2019-06-01 20:49:22 | serhiy.storchaka | set | keywords: +patch stage: patch review pull_requests: +pull_request13615 |
| 2019-06-01 20:49:09 | rhettinger | set | nosy: +rhettinger messages: +msg344227 |
| 2019-06-01 20:47:29 | serhiy.storchaka | create | |