From: Ezio Melotti Date: Fri, 18 Mar 2016 18:10:36 +0000 (+0200) Subject: #26250: document the sqlite3.Cursor.connection attribute. Initial patches by Aviv... X-Git-Tag: v3.6.0a1~442^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62564dbb4b4a882d4702111ba43bb5b204945a62;p=thirdparty%2FPython%2Fcpython.git #26250: document the sqlite3.Cursor.connection attribute. Initial patches by Aviv Palivoda and Varpu Rantala. --- diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index b14ea722ffa2..aee444b1388b 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -627,6 +627,18 @@ Cursor Objects 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() ` 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 index 3f70eef71c0e..3a9cd6f53b4b 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1173,6 +1173,7 @@ Burton Radons Abhilash Raj Shorya Raj Jeff Ramnani +Varpu Rantala Brodie Rao Senko Rasic Antti Rasinen