Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d56de962
Commit
d56de962
authored
Jul 30, 2015
by
Robert Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
parent
8c7eb783
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Doc/faq/programming.rst
Doc/faq/programming.rst
+2
-4
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/faq/programming.rst
View file @
d56de962
...
...
@@ -187,10 +187,8 @@ What are the rules for local and global variables in Python?
------------------------------------------------------------
In Python, variables that are only referenced inside a function are implicitly
global. If a variable is assigned a new value anywhere within the function's
body, it's assumed to be a local. If a variable is ever assigned a new value
inside the function, the variable is implicitly local, and you need to
explicitly declare it as 'global'.
global. If a variable is assigned a value anywhere within the function's body,
it's assumed to be a local unless explicitly declared as global.
Though a bit surprising at first, a moment's consideration explains this. On
one hand, requiring :keyword:`global` for assigned variables provides a bar
...
...
Misc/NEWS
View file @
d56de962
...
...
@@ -396,6 +396,8 @@ C API
Documentation
-------------
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
- Issue #24351: Clarify what is meant by "identifier" in the context of
string.Template instances.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment