summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlbert Tugushev <albert@tugushev.ru>2020-02-26 11:09:29 -0500
committersqla-tester <sqla-tester@sqlalchemy.org>2020-02-26 11:09:29 -0500
commita836e3df5d973f75bd8330cecb76511b67c13612 (patch)
tree6c2e6de399ad90f49112bb5fecc02ae99c651a63 /examples
parente15c53716b9f59c7c666c77d1e8b8d82538036a3 (diff)
downloadsqlalchemy-a836e3df5d973f75bd8330cecb76511b67c13612.tar.gz
Remove print statement in favor of print() function in docs and examples
<!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> Remove print statements ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [X] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #5166 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5166 Pull-request-sha: 04a7394f71298322188f0861b4dfe93e5485839d Change-Id: Ib90a59fac929661a18748c6e44966fb87e3978c6
Diffstat (limited to 'examples')
-rw-r--r--examples/dogpile_caching/__init__.py2
-rw-r--r--examples/elementtree/__init__.py2
-rw-r--r--examples/graphs/__init__.py2
-rw-r--r--examples/postgis/__init__.py4
-rw-r--r--examples/vertical/__init__.py2
5 files changed, 6 insertions, 6 deletions
diff --git a/examples/dogpile_caching/__init__.py b/examples/dogpile_caching/__init__.py
index 91105dc02..de4a339a7 100644
--- a/examples/dogpile_caching/__init__.py
+++ b/examples/dogpile_caching/__init__.py
@@ -25,7 +25,7 @@ E.g.::
q = q.options(RelationshipCache(Person.addresses, "default"))
# query
- print q.all()
+ print(q.all())
To run, both SQLAlchemy and dogpile.cache must be
installed or on the current PYTHONPATH. The demo will create a local
diff --git a/examples/elementtree/__init__.py b/examples/elementtree/__init__.py
index 82bb87361..b2d90a739 100644
--- a/examples/elementtree/__init__.py
+++ b/examples/elementtree/__init__.py
@@ -17,7 +17,7 @@ E.g.::
# locate documents with a certain path/attribute structure
for document in find_document('/somefile/header/field2[@attr=foo]'):
# dump the XML
- print document
+ print(document)
.. autosource::
:files: pickle_type.py, adjacency_list.py, optimized_al.py
diff --git a/examples/graphs/__init__.py b/examples/graphs/__init__.py
index 0f8fe58a7..cd0d1ddd8 100644
--- a/examples/graphs/__init__.py
+++ b/examples/graphs/__init__.py
@@ -6,7 +6,7 @@ and querying for lower- and upper- neighbors are illustrated::
n2 = Node(2)
n5 = Node(5)
n2.add_neighbor(n5)
- print n2.higher_neighbors()
+ print(n2.higher_neighbors())
.. autosource::
diff --git a/examples/postgis/__init__.py b/examples/postgis/__init__.py
index 963a561f3..dcdbfcf57 100644
--- a/examples/postgis/__init__.py
+++ b/examples/postgis/__init__.py
@@ -31,8 +31,8 @@ and simple to use extension points.
E.g.::
- print session.query(Road).filter(
- Road.road_geom.intersects(r1.road_geom)).all()
+ print(session.query(Road).filter(
+ Road.road_geom.intersects(r1.road_geom)).all())
.. autosource::
diff --git a/examples/vertical/__init__.py b/examples/vertical/__init__.py
index 0e09b9a55..b0c00b664 100644
--- a/examples/vertical/__init__.py
+++ b/examples/vertical/__init__.py
@@ -27,7 +27,7 @@ Example::
filter(Animal.facts.any(
and_(AnimalFact.key == u'weasel-like',
AnimalFact.value == True))))
- print 'weasel-like animals', q.all()
+ print('weasel-like animals', q.all())
.. autosource::