File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,10 +187,8 @@ What are the rules for local and global variables in Python?
187187------------------------------------------------------------
188188
189189In Python, variables that are only referenced inside a function are implicitly
190- global. If a variable is assigned a new value anywhere within the function's
191- body, it's assumed to be a local. If a variable is ever assigned a new value
192- inside the function, the variable is implicitly local, and you need to
193- explicitly declare it as 'global'.
190+ global. If a variable is assigned a value anywhere within the function's body,
191+ it's assumed to be a local unless explicitly declared as global.
194192
195193Though a bit surprising at first, a moment's consideration explains this. On
196194one hand, requiring :keyword: `global ` for assigned variables provides a bar
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ Library
2323
2424- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
2525
26+ Documentation
27+ -------------
28+
29+ - Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
30+
2631
2732What's New in Python 3.5.0 beta 4?
2833==================================
You can’t perform that action at this time.
0 commit comments