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 @@ -396,6 +396,8 @@ C API
396396Documentation
397397-------------
398398
399+ - Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
400+
399401- Issue #24351: Clarify what is meant by "identifier" in the context of
400402 string.Template instances.
401403
You can’t perform that action at this time.
0 commit comments