summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-15 21:43:27 (GMT)
committerGitHub <noreply@github.com>2020-05-15 21:43:27 (GMT)
commitc3d025a86a60348f19551bd9921304c5db322531 (patch)
tree5b26b21c1af2b08eca4d902ac3565fbf5a790273 /Lib/test
parentfcea08059f46d2d9582bb7ce5b2e905b20b86e8e (diff)
downloadcpython-c3d025a86a60348f19551bd9921304c5db322531.zip
cpython-c3d025a86a60348f19551bd9921304c5db322531.tar.gz
cpython-c3d025a86a60348f19551bd9921304c5db322531.tar.bz2
bpo-40636: Clarify the zip built-in docstring. (GH-20118)
Clarify the zip built-in docstring. This puts much simpler text up front along with an example. As it was, the zip built-in docstring was technically correct. But too technical for the reader who shouldn't _need_ to know about `__next__` and `StopIteration` as most people do not need to understand the internal implementation details of the iterator protocol in their daily life. This is a documentation only change, intended to be backported to 3.8; it is only tangentially related to PEP-618 which might offer new behavior options in the future. Wording based a bit more on enumerate per Brandt's suggestion. This gets rid of the legacy wording paragraph which seems too tied to implementation details of the iterator protocol which isn't relevant here. Co-authored-by: Brandt Bucher <brandtbucher@gmail.com> (cherry picked from commit 6a5d3ff67644af42b1a781be2eacb2e82913441c) Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_doctest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 502b90e..ad30a05 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -669,7 +669,7 @@ plain ol' Python and is guaranteed to be available.
True
>>> real_tests = [t for t in tests if len(t.examples) > 0]
>>> len(real_tests) # objects that actually have doctests
- 12
+ 13
>>> for t in real_tests:
... print('{} {}'.format(len(t.examples), t.name))
...
@@ -685,6 +685,7 @@ plain ol' Python and is guaranteed to be available.
2 builtins.int.bit_length
5 builtins.memoryview.hex
1 builtins.oct
+ 1 builtins.zip
Note here that 'bin', 'oct', and 'hex' are functions; 'float.as_integer_ratio',
'float.hex', and 'int.bit_length' are methods; 'float.fromhex' is a classmethod,