summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuaridh Williamson <ruaridhw@users.noreply.github.com>2020-05-28 20:56:43 +0100
committerGitHub <noreply@github.com>2020-05-28 12:56:43 -0700
commit5e0ed8abc95c2e9b3da88f00b974f9621d2b79b0 (patch)
treecd541bc47eff3b5c6af6e953b7524e3800b4559c
parentd9c1f1991969e99791de75b2bc935e6445bc5dcd (diff)
downloadcpython-git-5e0ed8abc95c2e9b3da88f00b974f9621d2b79b0.tar.gz
Note the output ordering of combinatoric functions (GH-19732)
-rw-r--r--Doc/library/itertools.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 3c94c4b35d..107bc515a6 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -199,9 +199,9 @@ loops that truncate the stream.
Return *r* length subsequences of elements from the input *iterable*.
- Combinations are emitted in lexicographic sort order. So, if the
- input *iterable* is sorted, the combination tuples will be produced
- in sorted order.
+ The combination tuples are emitted in lexicographic ordering according to
+ the order of the input *iterable*. So, if the input *iterable* is sorted,
+ the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their
value. So if the input elements are unique, there will be no repeat
@@ -248,9 +248,9 @@ loops that truncate the stream.
Return *r* length subsequences of elements from the input *iterable*
allowing individual elements to be repeated more than once.
- Combinations are emitted in lexicographic sort order. So, if the
- input *iterable* is sorted, the combination tuples will be produced
- in sorted order.
+ The combination tuples are emitted in lexicographic ordering according to
+ the order of the input *iterable*. So, if the input *iterable* is sorted,
+ the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their
value. So if the input elements are unique, the generated combinations
@@ -484,9 +484,9 @@ loops that truncate the stream.
of the *iterable* and all possible full-length permutations
are generated.
- Permutations are emitted in lexicographic sort order. So, if the
- input *iterable* is sorted, the permutation tuples will be produced
- in sorted order.
+ The permutation tuples are emitted in lexicographic ordering according to
+ the order of the input *iterable*. So, if the input *iterable* is sorted,
+ the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their
value. So if the input elements are unique, there will be no repeat