#1535: rename __builtin__ module to builtins.

This commit is contained in:
Georg Brandl 2007-12-02 09:40:06 +00:00
parent 87f9c53937
commit 1a3284ed69
70 changed files with 246 additions and 247 deletions

View file

@ -98,7 +98,7 @@ until the 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 :mod:`__main__`, so they have their own
global namespace. (The built-in names actually also live in a module; this is
called :mod:`__builtin__`.)
called :mod:`builtins`.)
The local namespace for a function is created when the function is called, and
deleted when the function returns or raises an exception that is not handled

View file

@ -308,14 +308,14 @@ Without arguments, :func:`dir` lists the names you have defined currently::
Note that it lists all types of names: variables, modules, functions, etc.
.. index:: module: __builtin__
.. index:: module: builtins
:func:`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
:mod:`__builtin__`::
:mod:`builtins`::
>>> import __builtin__
>>> dir(__builtin__)
>>> import builtins
>>> dir(builtins)
['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'Buffer
Error', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Excep