This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年04月02日 10:48 by ajaksu2, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg64846 - (view) | Author: Daniel Diniz (ajaksu2) * (Python triager) | Date: 2008年04月02日 10:48 | |
Currently, Modules/itertoolsmodule.c lines 2471-2475 are: PyDoc_STRVAR(permutations_doc, "permutations(iterables[, r]) --> permutations object\n\ \n\ Return successive r-length permutations of elements in the iterable.\n\n\ permutations(range(4), 3) --> (0,1,2), (0,1,3), (0,2,3), (1,2,3)"); but that describes behavior of itertools.combinations. The correct example is in a comment on line 2254 of the same file: 'permutations(range(3), 2) --> (0,1) (0,2) (1,0) (1,2) (2,0) (2,1)' I used "misleading" instead of "wrong" because the current docstring does show a subset of the real output and could be said to be incomplete. If that is the case, I suggest being explicit: 'permutations(range(4), 3) --> (0, 1, 2), (0, 1, 3), (0, 2, 1), (0, 2, 3), (0, 3, 1), (0, 3, 2), (1, 0, 2), (1, 0, 3), (1, 2, 0), (1, 2, 3), (1, 3, 0), (1, 3, 2), (2, 0, 1), (2, 0, 3), (2, 1, 0), (2, 1, 3), (2, 3, 0), (2, 3, 1), (3, 0, 1), (3, 0, 2), (3, 1, 0), (3, 1, 2), (3, 2, 0), (3, 2, 1)' |
|||
| msg67902 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2008年06月10日 12:48 | |
Fixed in r64067. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:32 | admin | set | github: 46788 |
| 2008年06月10日 12:48:35 | georg.brandl | set | status: open -> closed resolution: fixed messages: + msg67902 nosy: + georg.brandl |
| 2008年04月02日 10:48:02 | ajaksu2 | create | |