[Python-checkins] cpython (merge 3.5 -> default): Document sqlite3.Cursor.close()

berker.peksag python-checkins at python.org
Sun Mar 27 14:49:29 EDT 2016


https://hg.python.org/cpython/rev/440ccee2399b
changeset:   100770:440ccee2399b
parent:      100768:c06cbf1525ec
parent:      100769:0d7d855a7878
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sun Mar 27 21:51:22 2016 +0300
summary:
  Document sqlite3.Cursor.close()

The behaviour of the close method is tested by ClosedCurTests
in Lib/sqlite3/test/dbapi.py.

This is basically a backport of https://github.com/ghaering/pysqlite/issues/73.

files:
  Doc/library/sqlite3.rst |  6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -593,6 +593,12 @@
       the cursor's arraysize attribute can affect the performance of this operation.
       An empty list is returned when no rows are available.
 
+   .. method:: close()
+
+      Close the cursor now (rather than whenever ``__del__`` is called).
+
+      The cursor will be unusable from this point forward; a ``ProgrammingError``
+      exception will be raised if any operation is attempted with the cursor.
 
    .. attribute:: rowcount
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list