diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2016-03-18 18:10:36 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2016-03-18 18:10:36 (GMT) |
commit | 3a4bdb6322fb9cf52baebf5c5ab72c0f8b52a18a (patch) | |
tree | 8de903cfd9a5b7a3c32d83aefb9e268ef81dec81 /Doc | |
parent | 9cb2074fe44cfd6dd79a5f741619c376ed03da14 (diff) | |
download | cpython-3a4bdb6322fb9cf52baebf5c5ab72c0f8b52a18a.zip cpython-3a4bdb6322fb9cf52baebf5c5ab72c0f8b52a18a.tar.gz cpython-3a4bdb6322fb9cf52baebf5c5ab72c0f8b52a18a.tar.bz2 |
#26250: document the sqlite3.Cursor.connection attribute. Initial patches by Aviv Palivoda and Varpu Rantala.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sqlite3.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index ff634c0..a840bb6 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() <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 |