summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-08-10 06:01:05 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-08-10 06:01:05 (GMT)
commit11328fc48056bc47e920c60fe2f6bb257ae1480a (patch)
treed707c74fa6850466ede8e24ec8d902ffb398795f /Doc
parent7a573706374cac074f00d8e3f14d1b2db9fc89c6 (diff)
parent9f8b3a0b9258860f3adbdef478a1caf60940df94 (diff)
downloadcpython-11328fc48056bc47e920c60fe2f6bb257ae1480a.zip
cpython-11328fc48056bc47e920c60fe2f6bb257ae1480a.tar.gz
cpython-11328fc48056bc47e920c60fe2f6bb257ae1480a.tar.bz2
Closes #27210: Merge with 3.5
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/difflib.rst8
-rw-r--r--Doc/library/ftplib.rst2
-rw-r--r--Doc/library/nntplib.rst10
3 files changed, 9 insertions, 11 deletions
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index 59a6478..6743bdc 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -170,8 +170,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
>>> s1 = ['bacon\n', 'eggs\n', 'ham\n', 'guido\n']
>>> s2 = ['python\n', 'eggy\n', 'hamster\n', 'guido\n']
- >>> for line in context_diff(s1, s2, fromfile='before.py', tofile='after.py'):
- ... sys.stdout.write(line) # doctest: +NORMALIZE_WHITESPACE
+ >>> sys.stdout.writelines(context_diff(s1, s2, fromfile='before.py', tofile='after.py'))
*** before.py
--- after.py
***************
@@ -209,7 +208,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
>>> import keyword
>>> get_close_matches('wheel', keyword.kwlist)
['while']
- >>> get_close_matches('apple', keyword.kwlist)
+ >>> get_close_matches('pineapple', keyword.kwlist)
[]
>>> get_close_matches('accept', keyword.kwlist)
['except']
@@ -303,8 +302,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
>>> s1 = ['bacon\n', 'eggs\n', 'ham\n', 'guido\n']
>>> s2 = ['python\n', 'eggy\n', 'hamster\n', 'guido\n']
- >>> for line in unified_diff(s1, s2, fromfile='before.py', tofile='after.py'):
- ... sys.stdout.write(line) # doctest: +NORMALIZE_WHITESPACE
+ >>> sys.stdout.writelines(unified_diff(s1, s2, fromfile='before.py', tofile='after.py'))
--- before.py
+++ after.py
@@ -1,4 +1,4 @@
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst
index 233e11f..1e35f37 100644
--- a/Doc/library/ftplib.rst
+++ b/Doc/library/ftplib.rst
@@ -57,7 +57,7 @@ The module defines the following items:
>>> with FTP("ftp1.at.proftpd.org") as ftp:
... ftp.login()
... ftp.dir()
- ...
+ ... # doctest: +SKIP
'230 Anonymous login ok, restrictions apply.'
dr-xr-xr-x 9 ftp ftp 154 May 6 10:43 .
dr-xr-xr-x 9 ftp ftp 154 May 6 10:43 ..
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
index 9790e3a..4577ff4 100644
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -75,7 +75,7 @@ The module itself defines the following classes:
>>> from nntplib import NNTP
>>> with NNTP('news.gmane.org') as n:
... n.group('gmane.comp.python.committers')
- ...
+ ... # doctest: +SKIP
('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, 'gmane.comp.python.committers')
>>>
@@ -261,9 +261,9 @@ tuples or objects that the method normally returns will be empty.
>>> from datetime import date, timedelta
>>> resp, groups = s.newgroups(date.today() - timedelta(days=3))
- >>> len(groups)
+ >>> len(groups) # doctest: +SKIP
85
- >>> groups[0]
+ >>> groups[0] # doctest: +SKIP
GroupInfo(group='gmane.network.tor.devel', last='4', first='1', flag='m')
@@ -312,9 +312,9 @@ tuples or objects that the method normally returns will be empty.
is a dictionary mapping group names to textual descriptions.
>>> resp, descs = s.descriptions('gmane.comp.python.*')
- >>> len(descs)
+ >>> len(descs) # doctest: +SKIP
295
- >>> descs.popitem()
+ >>> descs.popitem() # doctest: +SKIP
('gmane.comp.python.bio.general', 'BioPython discussion list (Moderated)')