~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/reference/executionmodel.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
If the global statement occurs within a block, all uses of the name specified in
113
113
the statement refer to the binding of that name in the top-level namespace.
114
114
Names are resolved in the top-level namespace by searching the global namespace,
115
 
i.e. the namespace of the module containing the code block, and the builtin
 
115
i.e. the namespace of the module containing the code block, and the builtins
116
116
namespace, the namespace of the module :mod:`__builtin__`.  The global namespace
117
 
is searched first.  If the name is not found there, the builtin namespace is
 
117
is searched first.  If the name is not found there, the builtins namespace is
118
118
searched.  The global statement must precede all uses of the name.
119
119
 
120
120
.. index:: pair: restricted; execution
128
128
itself.  ``__builtins__`` can be set to a user-created dictionary to create a
129
129
weak form of restricted execution.
130
130
 
131
 
.. note::
 
131
.. impl-detail::
132
132
 
133
133
   Users should not touch ``__builtins__``; it is strictly an implementation
134
134
   detail.  Users wanting to override values in the built-in namespace should