[New-bugs-announce] [issue36739] "4.6. Defining Functions" should mention nonlocal

Peter Bauer report at bugs.python.org
Sat Apr 27 00:24:09 EDT 2019


New submission from Peter Bauer <p-bauer-it at t-online.de>:

In the fourth paragraph, the sentence 

"Thus, global variables cannot be directly assigned a value within a function (unless named in a global statement)"

should somehow be extended to mention the nonlocal-statements:

Thus, global variables or variables of enclosing functions cannot be directly assigned a value within a function (unless named in a global statement (for global variables) or named in a nonlocal statement (for variables of enclosing functions)

----------
assignee: docs at python
components: Documentation
messages: 340963
nosy: docs at python, pbhd0815
priority: normal
severity: normal
status: open
title: "4.6. Defining Functions" should mention nonlocal
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36739>
_______________________________________


More information about the New-bugs-announce mailing list