Skip to content

Commit 935feba

Browse files
committed
Fix doc bug w/ one(default=Exception)
Pointed out by @zwn at gratipay/gratipay.com#2106 (comment)
1 parent 55c69c0 commit 935feba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

postgres/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,15 @@ def one(self, sql, parameters=None, default=None, back_as=None, *a, **kw):
379379
:param string sql: the SQL statement to execute
380380
:param parameters: the `bind parameters`_ for the SQL statement
381381
:type parameters: dict or tuple
382-
:param default: the value to return if no results are found
382+
:param default: the value to return or raise if no results are found
383383
:param back_as: the type of record to return
384384
:type back_as: type or string
385385
:param a: passed through to :py:meth:`~postgres.Postgres.get_cursor`
386386
:param kw: passed through to :py:meth:`~postgres.Postgres.get_cursor`
387387
:returns: a single record or value or the value of the
388388
:py:attr:`default` argument
389389
:raises: :py:exc:`~postgres.TooFew` or :py:exc:`~postgres.TooMany`
390+
or `default` (if `default` is an `Exception` subclass or instance)
390391
391392
.. _bind parameters: #bind-parameters
392393

0 commit comments

Comments
 (0)