[Python-checkins] cpython (3.5): #26250: document the sqlite3.Cursor.connection attribute. Initial patches by
ezio.melotti
python-checkins at python.org
Fri Mar 18 14:13:17 EDT 2016
https://hg.python.org/cpython/rev/52660878c833
changeset: 100591:52660878c833
branch: 3.5
parent: 100589:599328247e84
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Fri Mar 18 20:10:36 2016 +0200
summary:
#26250: document the sqlite3.Cursor.connection attribute. Initial patches by Aviv Palivoda and Varpu Rantala.
files:
Doc/library/sqlite3.rst | 12 ++++++++++++
Misc/ACKS | 1 +
2 files changed, 13 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
@@ -627,6 +627,18 @@
It is set for ``SELECT`` statements without any matching rows as well.
+ .. attribute:: connection
+
+ This read-only attribute provides the SQLite database :class:`Connection`
+ used by the :class:`Cursor` object. A :class:`Cursor` object created by
+ calling :meth:`con.cursor() <Connection.cursor>` will have a
+ :attr:`connection` attribute that refers to *con*::
+
+ >>> con = sqlite3.connect(":memory:")
+ >>> cur = con.cursor()
+ >>> cur.connection == con
+ True
+
.. _sqlite3-row-objects:
Row Objects
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1173,6 +1173,7 @@
Abhilash Raj
Shorya Raj
Jeff Ramnani
+Varpu Rantala
Brodie Rao
Senko Rasic
Antti Rasinen
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list