Make print a function in documentation

This commit is contained in:
Stefan Wehrmeyer 2014-01-31 20:42:26 +01:00
parent 8f4cd59c9a
commit 5f2c0193b8
3 changed files with 4 additions and 4 deletions

View File

@ -238,7 +238,7 @@ class Database(object):
res = db.query('SELECT user, COUNT(*) c FROM photos GROUP BY user')
for row in res:
print row['user'], row['c']
print(row['user'], row['c'])
"""
return ResultIter(self.executable.execute(query, **kw))

View File

@ -403,6 +403,6 @@ class Table(object):
::
for row in table:
print row
print(row)
"""
return self.all()

View File

@ -71,7 +71,7 @@ When dealing with unknown databases we might want to check their structure
first. To start exploring, let's find out what tables are stored in the
database:
>>> print db.tables
>>> print(db.tables)
set([u'user', u'action'])
Now, let's list all columns available in the table ``user``:
@ -81,7 +81,7 @@ Now, let's list all columns available in the table ``user``:
Using ``len()`` we can get the total number of rows in a table:
>>> print len(db['user'])
>>> print(len(db['user']))
187
Reading data from tables