From 5f2c0193b870423cdb047af65f23ceb38383a1ba Mon Sep 17 00:00:00 2001 From: Stefan Wehrmeyer Date: Fri, 31 Jan 2014 20:42:26 +0100 Subject: [PATCH] Make print a function in documentation --- dataset/persistence/database.py | 2 +- dataset/persistence/table.py | 2 +- docs/quickstart.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dataset/persistence/database.py b/dataset/persistence/database.py index 8d1c800..af5ad07 100644 --- a/dataset/persistence/database.py +++ b/dataset/persistence/database.py @@ -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)) diff --git a/dataset/persistence/table.py b/dataset/persistence/table.py index a36a9c9..98d2ba2 100644 --- a/dataset/persistence/table.py +++ b/dataset/persistence/table.py @@ -403,6 +403,6 @@ class Table(object): :: for row in table: - print row + print(row) """ return self.all() diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 520468f..964484f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -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