Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
162c6a63
Commit
162c6a63
authored
Feb 14, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflect change in traceback format:
"innermost last" --> "most recent call last"
parent
15ad28cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
Doc/lib/libpdb.tex
Doc/lib/libpdb.tex
+1
-1
Doc/lib/libtraceback.tex
Doc/lib/libtraceback.tex
+1
-1
Doc/tut/tut.tex
Doc/tut/tut.tex
+12
-12
No files found.
Doc/lib/libpdb.tex
View file @
162c6a63
...
@@ -48,7 +48,7 @@ Typical usage to inspect a crashed program is:
...
@@ -48,7 +48,7 @@ Typical usage to inspect a crashed program is:
>>> import pdb
>>> import pdb
>>> import mymodule
>>> import mymodule
>>> mymodule.test()
>>> mymodule.test()
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
File "./mymodule.py", line 4, in test
File "./mymodule.py", line 4, in test
test2()
test2()
...
...
Doc/lib/libtraceback.tex
View file @
162c6a63
...
@@ -33,7 +33,7 @@ Print exception information and up to \var{limit} stack trace entries
...
@@ -33,7 +33,7 @@ Print exception information and up to \var{limit} stack trace entries
from
\var
{
traceback
}
to
\var
{
file
}
.
from
\var
{
traceback
}
to
\var
{
file
}
.
This differs from
\function
{
print
_
tb()
}
in the
This differs from
\function
{
print
_
tb()
}
in the
following ways: (1) if
\var
{
traceback
}
is not
\code
{
None
}
, it prints a
following ways: (1) if
\var
{
traceback
}
is not
\code
{
None
}
, it prints a
header
\samp
{
Traceback (
innermost
last):
}
; (2) it prints the
header
\samp
{
Traceback (
most recent call
last):
}
; (2) it prints the
exception
\var
{
type
}
and
\var
{
value
}
after the stack trace; (3) if
exception
\var
{
type
}
and
\var
{
value
}
after the stack trace; (3) if
\var
{
type
}
is
\exception
{
SyntaxError
}
and
\var
{
value
}
has the appropriate
\var
{
type
}
is
\exception
{
SyntaxError
}
and
\var
{
value
}
has the appropriate
format, it prints the line where the syntax error occurred with a
format, it prints the line where the syntax error occurred with a
...
...
Doc/tut/tut.tex
View file @
162c6a63
...
@@ -470,7 +470,7 @@ magnitude (as a float) or \code{z.real} to get its real part.
...
@@ -470,7 +470,7 @@ magnitude (as a float) or \code{z.real} to get its real part.
\begin{verbatim}
\begin{verbatim}
>>> a=1.5+0.5j
>>> a=1.5+0.5j
>>> float(a)
>>> float(a)
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
TypeError: can't convert complex to float; use e.g. abs(z)
TypeError: can't convert complex to float; use e.g. abs(z)
>>> a.real
>>> a.real
...
@@ -617,11 +617,11 @@ indexed position in the string results in an error:
...
@@ -617,11 +617,11 @@ indexed position in the string results in an error:
\begin{verbatim}
\begin{verbatim}
>>> word[0] = 'x'
>>> word[0] = 'x'
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
TypeError: object doesn't support item assignment
TypeError: object doesn't support item assignment
>>> word[:-1] = 'Splat'
>>> word[:-1] = 'Splat'
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
TypeError: object doesn't support slice assignment
TypeError: object doesn't support slice assignment
\end{verbatim}
\end{verbatim}
...
@@ -699,7 +699,7 @@ for single-element (non-slice) indices:
...
@@ -699,7 +699,7 @@ for single-element (non-slice) indices:
>>> word[-100:]
>>> word[-100:]
'HelpA'
'HelpA'
>>> word[-10] # error
>>> word[-10] # error
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
IndexError: string index out of range
IndexError: string index out of range
\end{verbatim}
\end{verbatim}
...
@@ -1432,7 +1432,7 @@ Here's an example that fails due to this restriction:
...
@@ -1432,7 +1432,7 @@ Here's an example that fails due to this restriction:
... pass
... pass
...
...
>>> function(0, a=0)
>>> function(0, a=0)
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
TypeError: keyword parameter redefined
TypeError: keyword parameter redefined
\end{verbatim}
\end{verbatim}
...
@@ -2852,7 +2852,7 @@ free up any system resources taken up by the open file. After calling
...
@@ -2852,7 +2852,7 @@ free up any system resources taken up by the open file. After calling
\begin{verbatim}
\begin{verbatim}
>>> f.close()
>>> f.close()
>>> f.read()
>>> f.read()
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1, in ?
File "<stdin>", line 1, in ?
ValueError: I/O operation on closed file
ValueError: I/O operation on closed file
\end{verbatim}
\end{verbatim}
...
@@ -2950,15 +2950,15 @@ however, and result in error messages as shown here:
...
@@ -2950,15 +2950,15 @@ however, and result in error messages as shown here:
\begin{verbatim}
\begin{verbatim}
>>> 10 * (1/0)
>>> 10 * (1/0)
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
ZeroDivisionError: integer division or modulo
ZeroDivisionError: integer division or modulo
>>> 4 + spam*3
>>> 4 + spam*3
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
NameError: spam
NameError: spam
>>> '2' + 2
>>> '2' + 2
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
TypeError: illegal argument type for built-in operation
TypeError: illegal argument type for built-in operation
\end{verbatim}
\end{verbatim}
...
@@ -3133,7 +3133,7 @@ For example:
...
@@ -3133,7 +3133,7 @@ For example:
\begin{verbatim}
\begin{verbatim}
>>> raise NameError, 'HiThere'
>>> raise NameError, 'HiThere'
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
NameError: HiThere
NameError: HiThere
\end{verbatim}
\end{verbatim}
...
@@ -3162,7 +3162,7 @@ variable or creating a new exception class. For example:
...
@@ -3162,7 +3162,7 @@ variable or creating a new exception class. For example:
...
...
My exception occurred, value: 4
My exception occurred, value: 4
>>> raise MyError, 1
>>> raise MyError, 1
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 1
File "<stdin>", line 1
__
main
__
.MyError: 1
__
main
__
.MyError: 1
\end{verbatim}
\end{verbatim}
...
@@ -3187,7 +3187,7 @@ circumstances. For example:
...
@@ -3187,7 +3187,7 @@ circumstances. For example:
... print 'Goodbye, world!'
... print 'Goodbye, world!'
...
...
Goodbye, world!
Goodbye, world!
Traceback (
innermost
last):
Traceback (
most recent call
last):
File "<stdin>", line 2
File "<stdin>", line 2
KeyboardInterrupt
KeyboardInterrupt
\end{verbatim}
\end{verbatim}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment