Skip to content

Commit 14cb8ee

Browse files
committed
Link to #16 from docs
1 parent a98ce19 commit 14cb8ee

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

postgres.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,19 @@ class Postgres(object):
239239
methods, which have slightly different semantics (under DB-API 2.0 you call
240240
:py:meth:`execute` on a cursor and then call one of the :py:meth:`fetch*`
241241
methods on the same cursor to retrieve rows; with our simple API there is
242-
no second :py:meth:`fetch` step). The context managers on this class are
243-
named starting with :py:meth:`get_` to set them apart from the simple-case
244-
API. Note that when working inside a block under one of the context
245-
managers, you're using DB-API 2.0 (:py:meth:`execute` + :py:meth:`fetch*`),
246-
not our simple API (:py:meth:`~postgres.Postgres.run` /
242+
no second :py:meth:`fetch` step). See `this ticket`_ for more of the
243+
rationale behind these names. The context managers on this class are named
244+
starting with :py:meth:`get_` to set them apart from the simple-case API.
245+
Note that when working inside a block under one of the context managers,
246+
you're using DB-API 2.0 (:py:meth:`execute` + :py:meth:`fetch*`), not our
247+
simple API (:py:meth:`~postgres.Postgres.run` /
247248
:py:meth:`~postgres.Postgres.one` / :py:meth:`~postgres.Postgres.rows`).
248249
249250
>>> import postgres
250251
>>> db = postgres.Postgres("postgres://jrandom@localhost/test")
251252
253+
.. _this ticket: https://github.com/gittip/postgres.py/issues/16
254+
252255
"""
253256

254257
def __init__(self, url, minconn=1, maxconn=10, \

0 commit comments

Comments
 (0)