summaryrefslogtreecommitdiffstats
path: root/Doc/tut/tut.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-03-01 03:20:41 (GMT)
committerGuido van Rossum <guido@python.org>2003-03-01 03:20:41 (GMT)
commit46d3dc37e4a01e8d72b00ab9ad4e4a07022b7b64 (patch)
treed2c8e67f458cd38115f6865be8034150d9e7242c /Doc/tut/tut.tex
parentd1a283be269c66eb813948febc3ce6c9405fb64f (diff)
downloadcpython-46d3dc37e4a01e8d72b00ab9ad4e4a07022b7b64.zip
cpython-46d3dc37e4a01e8d72b00ab9ad4e4a07022b7b64.tar.gz
cpython-46d3dc37e4a01e8d72b00ab9ad4e4a07022b7b64.tar.bz2
- New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects referenced by the traceback held in sys.exc_info()[2]. (SF patch #693195.) Thanks to Kevin Jacobs!
Diffstat (limited to 'Doc/tut/tut.tex')
-rw-r--r--Doc/tut/tut.tex17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index cfc56f0..a9fb325 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -2451,14 +2451,15 @@ a module defines. It returns a sorted list of strings:
['__name__', 'fib', 'fib2']
>>> dir(sys)
['__displayhook__', '__doc__', '__excepthook__', '__name__', '__stderr__',
- '__stdin__', '__stdout__', '_getframe', 'argv', 'builtin_module_names',
- 'byteorder', 'copyright', 'displayhook', 'exc_info', 'exc_type',
- 'excepthook', 'exec_prefix', 'executable', 'exit', 'getdefaultencoding',
- 'getdlopenflags', 'getrecursionlimit', 'getrefcount', 'hexversion',
- 'maxint', 'maxunicode', 'modules', 'path', 'platform', 'prefix', 'ps1',
- 'ps2', 'setcheckinterval', 'setdlopenflags', 'setprofile',
- 'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout', 'version',
- 'version_info', 'warnoptions']
+ '__stdin__', '__stdout__', '_getframe', 'api_version', 'argv',
+ 'builtin_module_names', 'byteorder', 'callstats', 'copyright',
+ 'displayhook', 'exc_clear', 'exc_info', 'exc_type', 'excepthook',
+ 'exec_prefix', 'executable', 'exit', 'getdefaultencoding', 'getdlopenflags',
+ 'getrecursionlimit', 'getrefcount', 'hexversion', 'maxint', 'maxunicode',
+ 'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache',
+ 'platform', 'prefix', 'ps1', 'ps2', 'setcheckinterval', 'setdlopenflags',
+ 'setprofile', 'setrecursionlimit', 'settrace', 'stderr', 'stdin', 'stdout',
+ 'version', 'version_info', 'warnoptions']
\end{verbatim}
Without arguments, \function{dir()} lists the names you have defined