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
776ff093
Commit
776ff093
authored
Nov 14, 2009
by
R. David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix print function conversion missed in merge of faq/programming update.
parent
5758a86f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Doc/faq/programming.rst
Doc/faq/programming.rst
+1
-1
No files found.
Doc/faq/programming.rst
View file @
776ff093
...
...
@@ -310,7 +310,7 @@ This is because when you make an assignment to a variable in a scope, that
variable becomes local to that scope and shadows any similarly named variable
in the outer scope. Since the last statement in foo assigns a new value to
``x``, the compiler recognizes it as a local variable. Consequently when the
earlier ``print
x
`` attempts to print the uninitialized local variable and
earlier ``print
(x)
`` attempts to print the uninitialized local variable and
an error results.
In the example above you can access the outer scope variable by declaring it
...
...
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