summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-10 16:02:19 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-10 16:02:19 (GMT)
commit0041223f51ffc267417dbd697716add494735b3a (patch)
treed6ed06b741b07b85fdf232f03600abc5d193950e
parent454f37bec202f1a71607efdbd40549196d6404c4 (diff)
downloadcpython-0041223f51ffc267417dbd697716add494735b3a.zip
cpython-0041223f51ffc267417dbd697716add494735b3a.tar.gz
cpython-0041223f51ffc267417dbd697716add494735b3a.tar.bz2
Fixed print -> print()
-rw-r--r--Doc/library/collections.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 6f2961a..fdfdefe 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -474,7 +474,7 @@ by the :mod:`csv` or :mod:`sqlite3` modules::
cursor = conn.cursor()
cursor.execute('SELECT name, age, title, department, paygrade FROM employees')
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
three additional methods and one attribute. To prevent conflicts with
@@ -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)
>>> 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=14.000 y= 5.000 hypot=14.866