diff options
author | Guido van Rossum <guido@python.org> | 1993-10-27 13:49:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-10-27 13:49:20 (GMT) |
commit | 4bd023f88291cedbae91f2dea4b13509fc5c2d9a (patch) | |
tree | 53ba017d67481f5a3fa0dcbe94b38dbe82a3a82c /Doc/tut | |
parent | 3b716046a0758fa87131fcd1ea415adb0b7a8d89 (diff) | |
download | cpython-4bd023f88291cedbae91f2dea4b13509fc5c2d9a.zip cpython-4bd023f88291cedbae91f2dea4b13509fc5c2d9a.tar.gz cpython-4bd023f88291cedbae91f2dea4b13509fc5c2d9a.tar.bz2 |
* lib3.tex (module string): added rindex().
* lib1.tex (section{Built-in Functions}): added bagof(), lambda(), map()
and reduce(). Repharased apply(). Removed or rephrased references to
exec() (now the exec stmt).
* lib4.tex: posix.exec --> posix.execv
* ref4.tex, ref8.tex, tut.tex: builtin --> __builtin__
* lib3.tex (module string): added atof() and atol(), and ato[fl]_error.
Diffstat (limited to 'Doc/tut')
-rw-r--r-- | Doc/tut/tut.tex | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index a51fb83..3aaeba9 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1605,15 +1605,19 @@ Note that it lists all types of names: variables, modules, functions, etc. {\tt dir()} does not list the names of built-in functions and variables. If you want a list of those, they are defined in the standard module -{\tt builtin}: - -\bcode\begin{verbatim} ->>> import builtin ->>> dir(builtin) -['EOFError', 'KeyboardInterrupt', 'MemoryError', 'NameError', 'None', 'Runti -meError', 'SystemError', 'TypeError', 'abs', 'chr', 'dir', 'divmod', 'eval', - 'exec', 'float', 'input', 'int', 'len', 'long', 'max', 'min', 'open', 'ord' -, 'pow', 'range', 'raw_input', 'reload', 'type'] +{\tt __builtin__}: + +\bcode\begin{verbatim} +>>> import __builtin__ +>>> dir(__builtin__) +['AccessError', 'AttributeError', 'ConflictError', 'EOFError', 'IOError', 'I +mportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', ' +NameError', 'None', 'OverflowError', 'RuntimeError', 'SyntaxError', 'SystemE +rror', 'SystemExit', 'TypeError', 'ValueError', 'ZeroDivisionError', 'abs', +'apply', 'chr', 'cmp', 'coerce', 'compile', 'dir', 'divmod', 'eval', 'execfi +le', 'float', 'getattr', 'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'le +n', 'long', 'max', 'min', 'oct', 'open', 'ord', 'pow', 'range', 'raw_input', + 'reload', 'repr', 'round', 'setattr', 'str', 'type'] >>> \end{verbatim}\ecode @@ -2083,8 +2087,7 @@ interpreter quits. The statements executed by the top-level invocation of the interpreter, either read from a script file or interactively, are considered part of a module called \verb\__main__\, so they have their own global name space. (The built-in names -actually also live in a module; this is called \verb\builtin\, -although it should really have been called \verb\__builtin__\.) +actually also live in a module; this is called \verb\__builtin__\.) The local name space for a function is created when the function is called, and deleted when the function returns or raises an exception |