diff -r 520cb70ecb90 Doc/extending/newtypes.rst --- a/Doc/extending/newtypes.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/extending/newtypes.rst Tue Oct 04 14:21:56 2016 +0530 @@ -124,7 +124,7 @@ >>> "" + noddy.new_noddy() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, TypeError: cannot add type "noddy.Noddy" to string Note that the name is a dotted name that includes both the module name and the diff -r 520cb70ecb90 Doc/howto/functional.rst --- a/Doc/howto/functional.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/howto/functional.rst Tue Oct 04 14:21:56 2016 +0530 @@ -210,7 +210,7 @@ 3 >>> next(it) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, StopIteration >>> @@ -474,7 +474,7 @@ 2 >>> next(gen) Traceback (most recent call last): - File "stdin", line 1, in ? + File "stdin", line 1, File "stdin", line 2, in generate_ints StopIteration @@ -577,7 +577,7 @@ 9 >>> next(it) #doctest: +SKIP Traceback (most recent call last): - File "t.py", line 15, in ? + File "t.py", line 15, it.next() StopIteration diff -r 520cb70ecb90 Doc/library/doctest.rst --- a/Doc/library/doctest.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/library/doctest.rst Tue Oct 04 14:21:56 2016 +0530 @@ -408,7 +408,7 @@ >>> [1, 2, 3].remove(42) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, 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 @@ >>> raise ValueError('multi\n line\ndetail') Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, ValueError: multi line detail @@ -591,7 +591,7 @@ >>> (1, 2)[3] = 'moo' Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, TypeError: object doesn't support item assignment passes under Python 2.3 and later Python versions with the flag specified, diff -r 520cb70ecb90 Doc/library/fpectl.rst --- a/Doc/library/fpectl.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/library/fpectl.rst Tue Oct 04 14:21:56 2016 +0530 @@ -89,7 +89,7 @@ >>> import math >>> math.exp(1000) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, FloatingPointError: in math_1 diff -r 520cb70ecb90 Doc/library/pdb.rst --- a/Doc/library/pdb.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/library/pdb.rst Tue Oct 04 14:21:56 2016 +0530 @@ -76,7 +76,7 @@ >>> import mymodule >>> mymodule.test() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, File "./mymodule.py", line 4, in test test2() File "./mymodule.py", line 3, in test2 diff -r 520cb70ecb90 Doc/library/unicodedata.rst --- a/Doc/library/unicodedata.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/library/unicodedata.rst Tue Oct 04 14:21:56 2016 +0530 @@ -158,7 +158,7 @@ 9 >>> unicodedata.decimal('a') Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, ValueError: not a decimal >>> unicodedata.category('A') # 'L'etter, 'u'ppercase 'Lu' diff -r 520cb70ecb90 Doc/reference/expressions.rst --- a/Doc/reference/expressions.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/reference/expressions.rst Tue Oct 04 14:21:56 2016 +0530 @@ -745,7 +745,7 @@ 2 1 >>> f(a=1, *(2,)) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, TypeError: f() got multiple values for keyword argument 'a' >>> f(1, *(2,)) 1 2 diff -r 520cb70ecb90 Doc/tutorial/classes.rst --- a/Doc/tutorial/classes.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/tutorial/classes.rst Tue Oct 04 14:21:56 2016 +0530 @@ -833,7 +833,7 @@ 'c' >>> next(it) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, next(it) StopIteration diff -r 520cb70ecb90 Doc/tutorial/controlflow.rst --- a/Doc/tutorial/controlflow.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/tutorial/controlflow.rst Tue Oct 04 14:21:56 2016 +0530 @@ -475,7 +475,7 @@ ... >>> function(0, a=0) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, TypeError: function() got multiple values for keyword argument 'a' When a final formal parameter of the form ``**name`` is present, it receives a diff -r 520cb70ecb90 Doc/tutorial/datastructures.rst --- a/Doc/tutorial/datastructures.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/tutorial/datastructures.rst Tue Oct 04 14:21:56 2016 +0530 @@ -258,7 +258,7 @@ [(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)] >>> # the tuple must be parenthesized, otherwise an error is raised >>> [x, x**2 for x in range(6)] - File "", line 1, in ? + File "", line 1, [x, x**2 for x in range(6)] ^ SyntaxError: invalid syntax diff -r 520cb70ecb90 Doc/tutorial/inputoutput.rst --- a/Doc/tutorial/inputoutput.rst Tue Oct 04 00:00:23 2016 -0700 +++ b/Doc/tutorial/inputoutput.rst Tue Oct 04 14:21:56 2016 +0530 @@ -362,7 +362,7 @@ >>> f.close() >>> f.read() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, ValueError: I/O operation on closed file It is good practice to use the :keyword:`with` keyword when dealing with file