bpo-28315: Improve code examples in docs (GH-1372)

Replace
   File "<stdin>", line 1, in ? 
with 
   File "<stdin>", line 1, in <module>
This commit is contained in:
UltimateCoder 2017-05-03 22:16:45 +05:30 committed by Mariatta
parent a5c62a8e9f
commit 8856940cf2
12 changed files with 30 additions and 30 deletions

View file

@ -408,7 +408,7 @@ Simple example::
>>> [1, 2, 3].remove(42)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list
That doctest succeeds if :exc:`ValueError` is raised, with the ``list.remove(x):
@ -432,7 +432,7 @@ multi-line detail::
>>> raise ValueError('multi\n line\ndetail')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in <module>
ValueError: multi
line
detail
@ -591,7 +591,7 @@ doctest decides whether actual output matches an example's expected output:
>>> (1, 2)[3] = 'moo'
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in <module>
TypeError: object doesn't support item assignment
passes under Python 2.3 and later Python versions with the flag specified,