[docs] Incorrect (misleading) statement in the execution model documentation (issue 24129)

ncoghlan at gmail.com ncoghlan at gmail.com
Sat Jun 20 16:08:18 CEST 2015


This looks like a solid improvement to me, just a couple of minor tweaks
suggested.


http://bugs.python.org/review/24129/diff/15117/Doc/reference/executionmodel.rst
File Doc/reference/executionmodel.rst (right):

http://bugs.python.org/review/24129/diff/15117/Doc/reference/executionmodel.rst#newcode108
Doc/reference/executionmodel.rst:108: name refers to a local variable
that has not been bound, an
For the second sentence, I'd suggest: "If the current scope is a
function scope, and the name refers to a local variable that has not yet
been bound to a value at the point where the name is used, an
:exc:`UnboundLocalError` exception is raised."

http://bugs.python.org/review/24129/diff/15117/Doc/reference/executionmodel.rst#newcode135
Doc/reference/executionmodel.rst:135: to previously bound variables in
the nearest enclosing scope excluding globals.
I'd change the ending here to: "nearest enclosing function scope.
:exc:`SyntaxError` is raised at compile time if the given name does not
exist in any enclosing function scope."

http://bugs.python.org/review/24129/


More information about the docs mailing list