Skip to content

Commit b562136

Browse files
committed
Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
1 parent 59f1a7d commit b562136

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/faq/programming.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,8 @@ What are the rules for local and global variables in Python?
333333
------------------------------------------------------------
334334

335335
In 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

341339
Though a bit surprising at first, a moment's consideration explains this. On
342340
one hand, requiring :keyword:`global` for assigned variables provides a bar

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ IDLE
136136
Documentation
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

0 commit comments

Comments
 (0)