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
5b144bfb
Commit
5b144bfb
authored
Feb 12, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor markup nits.
parent
7fc83143
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
Doc/ref/ref5.tex
Doc/ref/ref5.tex
+2
-4
Doc/ref/ref7.tex
Doc/ref/ref7.tex
+10
-14
No files found.
Doc/ref/ref5.tex
View file @
5b144bfb
...
@@ -360,10 +360,8 @@ proper slice is a slice object (see section \ref{types}) whose
...
@@ -360,10 +360,8 @@ proper slice is a slice object (see section \ref{types}) whose
values of the expressions given as lower bound, upper bound and
values of the expressions given as lower bound, upper bound and
stride, respectively, substituting
\code
{
None
}
for missing
stride, respectively, substituting
\code
{
None
}
for missing
expressions.
expressions.
\withsubitem
{
(slice object attribute)
}{
%
\withsubitem
{
(slice object attribute)
}{
\ttindex
{
start
}
\ttindex
{
start
}
%
\ttindex
{
stop
}
\ttindex
{
step
}}
\ttindex
{
stop
}
%
\ttindex
{
step
}}
\subsection
{
Calls
\label
{
calls
}}
\subsection
{
Calls
\label
{
calls
}}
\index
{
call
}
\index
{
call
}
...
...
Doc/ref/ref7.tex
View file @
5b144bfb
...
@@ -225,25 +225,21 @@ exception, and the exception occurs in the try clause of the inner
...
@@ -225,25 +225,21 @@ exception, and the exception occurs in the try clause of the inner
handler, the outer handler will not handle the exception.)
handler, the outer handler will not handle the exception.)
Before an except clause's suite is executed, details about the
Before an except clause's suite is executed, details about the
exception are assigned to three variables in the
\module
{
sys
}
module:
exception are assigned to three variables in the
\
code
{
sys.exc
_
type
}
receives the object identifying the exception;
\
module
{
sys
}
\refbimodindex
{
sys
}
module:
\code
{
sys.exc
_
type
}
receives
\code
{
sys.exc
_
value
}
receives the exception's parameter;
the object identifying the exception;
\code
{
sys.exc
_
value
}
receives
\code
{
sys.exc
_
traceback
}
receives a traceback object (see section
the exception's parameter;
\code
{
sys.exc
_
traceback
}
receives a
\ref
{
traceback
}
) identifying the point in the program where the
traceback object
\obindex
{
traceback
}
(see section
\ref
{
traceback
}
)
exception occurred.
identifying the point in the program where the
exception occurred.
These details are also available through the
\function
{
sys.exc
_
info()
}
These details are also available through the
\function
{
sys.exc
_
info()
}
function, which returns a tuple
\code
{
(
exc
_
type,
}
\code
{
exc
_
value,
}
function, which returns a tuple
\code
{
(
\var
{
exc
_
type
}
,
\var
{
exc
_
value
}
,
\
code
{
exc
_
traceback
)
}
. Use of the corresponding variables is
\
var
{
exc
_
traceback
}
)
}
. Use of the corresponding variables is
deprecated in favor of this function, since their use is unsafe in a
deprecated in favor of this function, since their use is unsafe in a
threaded program. As of Python 1.5, the variables are restored to
threaded program. As of Python 1.5, the variables are restored to
their previous values (before the call) when returning from a function
their previous values (before the call) when returning from a function
that handled an exception.
that handled an exception.
\refbimodindex
{
sys
}
\withsubitem
{
(in module sys)
}{
\ttindex
{
exc
_
type
}
\withsubitem
{
(in module sys)
}{
%
\ttindex
{
exc
_
value
}
\ttindex
{
exc
_
traceback
}}
\ttindex
{
exc
_
type
}
%
\ttindex
{
exc
_
value
}
%
\ttindex
{
exc
_
traceback
}}
\obindex
{
traceback
}
The optional
\keyword
{
else
}
clause is executed when no exception occurs
The optional
\keyword
{
else
}
clause is executed when no exception occurs
in the
\keyword
{
try
}
clause. Exceptions in the
\keyword
{
else
}
clause are
in the
\keyword
{
try
}
clause. Exceptions in the
\keyword
{
else
}
clause are
...
...
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