summaryrefslogtreecommitdiff
path: root/doc/build/faq/metadata_schema.rst
diff options
context:
space:
mode:
authorJeffrey Finkelstein <jeffrey.finkelstein@gmail.com>2016-05-03 21:02:29 -0400
committerJeffrey Finkelstein <jeffrey.finkelstein@gmail.com>2016-05-03 21:02:29 -0400
commitc31833e9973ef3b9fd4528e19eec0458bc8d51ee (patch)
tree01f751348e4f7fcf7c73877e2cad324e102024da /doc/build/faq/metadata_schema.rst
parent9a3c9ba7beb18dfd6232deb895528ea8593a12b0 (diff)
downloadsqlalchemy-pr/268.tar.gz
Adds parentheses around print statements in docs.pr/268
Diffstat (limited to 'doc/build/faq/metadata_schema.rst')
-rw-r--r--doc/build/faq/metadata_schema.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/build/faq/metadata_schema.rst b/doc/build/faq/metadata_schema.rst
index 9697399dc..7e4a55720 100644
--- a/doc/build/faq/metadata_schema.rst
+++ b/doc/build/faq/metadata_schema.rst
@@ -64,7 +64,7 @@ This is available via the :attr:`.MetaData.sorted_tables` function::
# ... add Table objects to metadata
ti = metadata.sorted_tables:
for t in ti:
- print t
+ print(t)
How can I get the CREATE TABLE/ DROP TABLE output as a string?
===========================================================================
@@ -74,17 +74,17 @@ can be rendered to strings like any other SQL expression::
from sqlalchemy.schema import CreateTable
- print CreateTable(mytable)
+ print(CreateTable(mytable))
To get the string specific to a certain engine::
- print CreateTable(mytable).compile(engine)
+ print(CreateTable(mytable).compile(engine))
There's also a special form of :class:`.Engine` that can let you dump an entire
metadata creation sequence, using this recipe::
def dump(sql, *multiparams, **params):
- print sql.compile(dialect=engine.dialect)
+ print(sql.compile(dialect=engine.dialect))
engine = create_engine('postgresql://', strategy='mock', executor=dump)
metadata.create_all(engine, checkfirst=False)