[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

File Doc/reference/executionmodel.rst (right):

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."

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."


More information about the docs mailing list