File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -333,10 +333,8 @@ What are the rules for local and global variables in Python?
333333------------------------------------------------------------
334334
335335In Python, variables that are only referenced inside a function are implicitly
336- global. If a variable is assigned a new value anywhere within the function's
337- body, it's assumed to be a local. If a variable is ever assigned a new value
338- inside the function, the variable is implicitly local, and you need to
339- explicitly declare it as 'global'.
336+ global. If a variable is assigned a value anywhere within the function's body,
337+ it's assumed to be a local unless explicitly declared as global.
340338
341339Though a bit surprising at first, a moment's consideration explains this. On
342340one hand, requiring :keyword: `global ` for assigned variables provides a bar
Original file line number Diff line number Diff line change 136136Documentation
137137-------------
138138
139+ - Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
140+
139141- Issue #22155: Add File Handlers subsection with createfilehandler to Tkinter
140142 doc. Remove obsolete example from FAQ. Patch by Martin Panter.
141143
You can’t perform that action at this time.
0 commit comments