Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0041223

Browse files
committed
Fixed print -> print()
1 parent 454f37b commit 0041223

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/collections.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ by the :mod:`csv` or :mod:`sqlite3` modules::
474474
cursor = conn.cursor()
475475
cursor.execute('SELECT name, age, title, department, paygrade FROM employees')
476476
for emp in map(EmployeeRecord._make, cursor.fetchall()):
477-
print emp.name, emp.title
477+
print(emp.name, emp.title)
478478

479479
In addition to the methods inherited from tuples, named tuples support
480480
three additional methods and one attribute. To prevent conflicts with
@@ -551,7 +551,7 @@ a fixed-width print format::
551551
... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
552552

553553
>>> for p in Point(3,4), Point(14,5), Point(9./7,6):
554-
... print p
554+
... print(p)
555555

556556
Point: x= 3.000 y= 4.000 hypot= 5.000
557557
Point: x=14.000 y= 5.000 hypot=14.866

0 commit comments

Comments
 (0)