diff -r 71fd5d2447d4 Doc/extending/newtypes.rst --- a/Doc/extending/newtypes.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/extending/newtypes.rst Wed Oct 05 14:24:50 2016 +0530 @@ -124,7 +124,7 @@ >>> "" + noddy.new_noddy() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in 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 71fd5d2447d4 Doc/howto/functional.rst --- a/Doc/howto/functional.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/howto/functional.rst Wed Oct 05 14:24:50 2016 +0530 @@ -210,7 +210,7 @@ 3 >>> next(it) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in StopIteration >>> @@ -474,7 +474,7 @@ 2 >>> next(gen) Traceback (most recent call last): - File "stdin", line 1, in ? + File "stdin", line 1, in 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, in it.next() StopIteration diff -r 71fd5d2447d4 Doc/library/ctypes.rst --- a/Doc/library/ctypes.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/library/ctypes.rst Wed Oct 05 14:24:50 2016 +0530 @@ -97,7 +97,7 @@ <_FuncPtr object at 0x...> >>> print(windll.kernel32.MyOwnFunction) # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in File "ctypes.py", line 239, in __getattr__ func = _StdcallFuncPtr(name, self) AttributeError: function 'MyOwnFunction' not found @@ -135,7 +135,7 @@ <_FuncPtr object at 0x...> >>> cdll.kernel32[0] # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in File "ctypes.py", line 310, in __getitem__ func = _StdcallFuncPtr(name, self) AttributeError: function ordinal 0 not found @@ -168,11 +168,11 @@ >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: Procedure probably called with not enough arguments (4 bytes missing) >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: Procedure probably called with too many arguments (4 bytes in excess) >>> @@ -181,13 +181,13 @@ >>> cdll.kernel32.GetModuleHandleA(None) # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: Procedure probably called with not enough arguments (4 bytes missing) >>> >>> windll.msvcrt.printf(b"spam") # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: Procedure probably called with too many arguments (4 bytes in excess) >>> @@ -200,7 +200,7 @@ >>> windll.kernel32.GetModuleHandleA(32) # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in OSError: exception: access violation reading 0x00000020 >>> @@ -369,7 +369,7 @@ 19 >>> printf(b"%f bottles of beer\n", 42.5) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ArgumentError: argument 2: exceptions.TypeError: Don't know how to convert parameter 2 >>> @@ -432,7 +432,7 @@ >>> printf(b"%d %d %d", 1, 2, 3) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ArgumentError: argument 2: exceptions.TypeError: wrong type >>> printf(b"%s %d %f\n", b"X", 2, 3) X 2 3.000000 @@ -482,7 +482,7 @@ 'def' >>> strchr(b"abcdef", b"def") Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ArgumentError: argument 2: exceptions.TypeError: one character string expected >>> print(strchr(b"abcdef", b"x")) None @@ -508,7 +508,7 @@ 486539264 >>> GetModuleHandle("something silly") # doctest: +WINDOWS Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in File "", line 3, in ValidHandle OSError: [Errno 126] The specified module could not be found. >>> @@ -579,7 +579,7 @@ 0 5 >>> POINT(1, 2, 3) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: too many initializers >>> @@ -782,7 +782,7 @@ >>> PI(42) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in TypeError: expected c_long instead of int >>> PI(c_int(42)) @@ -858,7 +858,7 @@ >>> bar.values = (c_byte * 4)() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in TypeError: incompatible types, c_byte_Array_4 instance instead of LP_c_long instance >>> @@ -909,7 +909,7 @@ ... ("next", POINTER(cell))] ... Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in File "", line 2, in cell NameError: name 'cell' is not defined >>> diff -r 71fd5d2447d4 Doc/library/doctest.rst --- a/Doc/library/doctest.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/library/doctest.rst Wed Oct 05 14:24:50 2016 +0530 @@ -408,7 +408,7 @@ >>> [1, 2, 3].remove(42) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in 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, in ValueError: multi line detail @@ -591,7 +591,7 @@ >>> (1, 2)[3] = 'moo' Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in TypeError: object doesn't support item assignment passes under Python 2.3 and later Python versions with the flag specified, diff -r 71fd5d2447d4 Doc/library/fpectl.rst --- a/Doc/library/fpectl.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/library/fpectl.rst Wed Oct 05 14:24:50 2016 +0530 @@ -89,7 +89,7 @@ >>> import math >>> math.exp(1000) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in FloatingPointError: in math_1 diff -r 71fd5d2447d4 Doc/library/pdb.rst --- a/Doc/library/pdb.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/library/pdb.rst Wed Oct 05 14:24:50 2016 +0530 @@ -76,7 +76,7 @@ >>> import mymodule >>> mymodule.test() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in File "./mymodule.py", line 4, in test test2() File "./mymodule.py", line 3, in test2 diff -r 71fd5d2447d4 Doc/library/unicodedata.rst --- a/Doc/library/unicodedata.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/library/unicodedata.rst Wed Oct 05 14:24:50 2016 +0530 @@ -158,7 +158,7 @@ 9 >>> unicodedata.decimal('a') Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: not a decimal >>> unicodedata.category('A') # 'L'etter, 'u'ppercase 'Lu' diff -r 71fd5d2447d4 Doc/reference/expressions.rst --- a/Doc/reference/expressions.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/reference/expressions.rst Wed Oct 05 14:24:50 2016 +0530 @@ -745,7 +745,7 @@ 2 1 >>> f(a=1, *(2,)) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in TypeError: f() got multiple values for keyword argument 'a' >>> f(1, *(2,)) 1 2 diff -r 71fd5d2447d4 Doc/tutorial/classes.rst --- a/Doc/tutorial/classes.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/tutorial/classes.rst Wed Oct 05 14:24:50 2016 +0530 @@ -833,7 +833,7 @@ 'c' >>> next(it) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in next(it) StopIteration diff -r 71fd5d2447d4 Doc/tutorial/controlflow.rst --- a/Doc/tutorial/controlflow.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/tutorial/controlflow.rst Wed Oct 05 14:24:50 2016 +0530 @@ -475,7 +475,7 @@ ... >>> function(0, a=0) Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in 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 71fd5d2447d4 Doc/tutorial/datastructures.rst --- a/Doc/tutorial/datastructures.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/tutorial/datastructures.rst Wed Oct 05 14:24:50 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, in [x, x**2 for x in range(6)] ^ SyntaxError: invalid syntax diff -r 71fd5d2447d4 Doc/tutorial/inputoutput.rst --- a/Doc/tutorial/inputoutput.rst Tue Oct 04 14:52:01 2016 -0400 +++ b/Doc/tutorial/inputoutput.rst Wed Oct 05 14:24:50 2016 +0530 @@ -362,7 +362,7 @@ >>> f.close() >>> f.read() Traceback (most recent call last): - File "", line 1, in ? + File "", line 1, in ValueError: I/O operation on closed file It is good practice to use the :keyword:`with` keyword when dealing with file