New submission from Peter Bauer :
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@python
components: Documentation
messages: 340963
nosy: docs@python, pbhd0815
priority: normal
severity: normal
status: open
title: "4.6. Defining Functions" should mention nonlocal
type: enhancement
versions: Python 3.9
___
Python tracker
<https://bugs.python.org/issue36739>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com