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-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a4bdb6322fb9cf52baebf5c5ab72c0f8b52a18a;p=python #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 ff634c0b96..a840bb674b 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -595,6 +595,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 d2a8e33e28..70b92e70d8 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1115,6 +1115,7 @@ Ram Rachum Jérôme Radix Burton Radons Jeff Ramnani +Varpu Rantala Brodie Rao Senko Rasic Antti Rasinen