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

levkivskyi at gmail.com levkivskyi at gmail.com
Sun Jun 21 15:54:03 CEST 2015


Reviewers: eric.snow, Nick Coghlan,


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

http://bugs.python.org/review/24129/diff/14851/Doc/reference/executionmodel.rst#newcode148
Doc/reference/executionmodel.rst:148: Free variables follow the normal
rules for name resolution,
On 2015/06/19 21:57:02, eric.snow wrote:
> It may be more clear to say:
> 
> These references follow the normal rules for name resolution with one
exception.
>  Unbound local variables are looked up in the global namespace. ...

Done.

http://bugs.python.org/review/24129/diff/14851/Doc/reference/executionmodel.rst#newcode149
Doc/reference/executionmodel.rst:149: while unbound local variables are
looked up in the global namespace.
On 2015/06/19 21:57:02, eric.snow wrote:
> If we stick with the current working, I'd suggest starting a new
sentence at
> "while".

I have changed the wording here to the one proposed in the previous
comment.

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
On 2015/06/20 16:08:18, Nick Coghlan wrote:
> 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."

Done.

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.
On 2015/06/20 16:08:18, Nick Coghlan wrote:
> 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."

Done.



Please review this at http://bugs.python.org/review/24129/

Affected files:
  Doc/reference/executionmodel.rst




More information about the docs mailing list