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
0041223f
Commit
0041223f
authored
Jan 10, 2008
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed print -> print()
parent
454f37be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/library/collections.rst
Doc/library/collections.rst
+2
-2
No files found.
Doc/library/collections.rst
View file @
0041223f
...
@@ -474,7 +474,7 @@ by the :mod:`csv` or :mod:`sqlite3` modules::
...
@@ -474,7 +474,7 @@ by the :mod:`csv` or :mod:`sqlite3` modules::
cursor = conn.cursor()
cursor = conn.cursor()
cursor.execute('SELECT name, age, title, department, paygrade FROM employees')
cursor.execute('SELECT name, age, title, department, paygrade FROM employees')
for emp in map(EmployeeRecord._make, cursor.fetchall()):
for emp in map(EmployeeRecord._make, cursor.fetchall()):
print
emp.name, emp.title
print
(emp.name, emp.title)
In addition to the methods inherited from tuples, named tuples support
In addition to the methods inherited from tuples, named tuples support
three additional methods and one attribute. To prevent conflicts with
three additional methods and one attribute. To prevent conflicts with
...
@@ -551,7 +551,7 @@ a fixed-width print format::
...
@@ -551,7 +551,7 @@ a fixed-width print format::
... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
>>> for p in Point(3,4), Point(14,5), Point(9./7,6):
>>> for p in Point(3,4), Point(14,5), Point(9./7,6):
... print
p
... print
(p)
Point: x= 3.000 y= 4.000 hypot= 5.000
Point: x= 3.000 y= 4.000 hypot= 5.000
Point: x=14.000 y= 5.000 hypot=14.866
Point: x=14.000 y= 5.000 hypot=14.866
...
...
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