From 39cfeb06fcf4757a6d2198a998c5884dcffd5a39 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 8 May 2019 15:59:28 -0400 Subject: [PATCH 1/6] #36620 Update itertools.rst add optional args to function definitions. --- Doc/library/itertools.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index b3a0a5f5192da1..2cc71a75af478e 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -47,7 +47,7 @@ Iterator Arguments Results ============================ ============================ ================================================= ============================================================= Iterator Arguments Results Example ============================ ============================ ================================================= ============================================================= -:func:`accumulate` p [,func] p0, p0+p1, p0+p1+p2, ... ``accumulate([1,2,3,4,5]) --> 1 3 6 10 15`` +:func:`accumulate` p [,func, \*, initial=None] p0, p0+p1, p0+p1+p2, ... ``accumulate([1,2,3,4,5]) --> 1 3 6 10 15`` :func:`chain` p, q, ... p0, p1, ... plast, q0, q1, ... ``chain('ABC', 'DEF') --> A B C D E F`` :func:`chain.from_iterable` iterable p0, p1, ... plast, q0, q1, ... ``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F`` :func:`compress` data, selectors (d[0] if s[0]), (d[1] if s[1]), ... ``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F`` @@ -58,7 +58,7 @@ Iterator Arguments Results :func:`starmap` func, seq func(\*seq[0]), func(\*seq[1]), ... ``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000`` :func:`takewhile` pred, seq seq[0], seq[1], until pred fails ``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4`` :func:`tee` it, n it1, it2, ... itn splits one iterator into n -:func:`zip_longest` p, q, ... (p[0], q[0]), (p[1], q[1]), ... ``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-`` +:func:`zip_longest` p, q, ... [, fillvalue=None] (p[0], q[0]), (p[1], q[1]), ... ``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-`` ============================ ============================ ================================================= ============================================================= **Combinatoric iterators:** From e7b5e8ca787ca60ef78b98ba0bb84e141a7ac048 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" Date: Wed, 8 May 2019 20:06:23 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst diff --git a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst new file mode 100644 index 00000000000000..27bbbf3526a864 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst @@ -0,0 +1 @@ +Update itertools documentation with optional args registration. \ No newline at end of file From 6caf7bec28b93f43064c91e7445de3a6b197c68c Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 8 May 2019 16:32:11 -0400 Subject: [PATCH 3/6] Remove NEWS release for small docfix. --- .../next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst diff --git a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst deleted file mode 100644 index 27bbbf3526a864..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst +++ /dev/null @@ -1 +0,0 @@ -Update itertools documentation with optional args registration. \ No newline at end of file From c347ea1bc92a6d1ab787e184c21eaf5d0ba70611 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 8 May 2019 16:35:51 -0400 Subject: [PATCH 4/6] Revert "Remove NEWS release for small docfix." This reverts commit 6caf7bec28b93f43064c91e7445de3a6b197c68c. --- .../next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst diff --git a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst new file mode 100644 index 00000000000000..27bbbf3526a864 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst @@ -0,0 +1 @@ +Update itertools documentation with optional args registration. \ No newline at end of file From 0758ed337066292a7dd01744fd7a4c9a576a45f1 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 8 May 2019 16:36:39 -0400 Subject: [PATCH 5/6] Update news entry to skip news. --- .../next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst index 27bbbf3526a864..3ccf69e721c75a 100644 --- a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst +++ b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst @@ -1 +1 @@ -Update itertools documentation with optional args registration. \ No newline at end of file +skip news From 80e346beb26942f76092bf629b29a13356f844b2 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 8 May 2019 17:04:03 -0400 Subject: [PATCH 6/6] Remove .rst file; reviewer adds skip news to buildbot build. --- .../next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst diff --git a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst b/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst deleted file mode 100644 index 3ccf69e721c75a..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2019-05-08-20-06-22.bpo-36620.5d3gYv.rst +++ /dev/null @@ -1 +0,0 @@ -skip news