]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90923: Improve sqlite3.Connection.execute* docs (#91643)
authorErlend Egeberg Aasland <erlend.aasland@innova.no>
Sun, 17 Apr 2022 21:12:55 +0000 (23:12 +0200)
committerGitHub <noreply@github.com>
Sun, 17 Apr 2022 21:12:55 +0000 (14:12 -0700)
- Drop 'nonstandard'; it does not add any value
- Try to be more concise
- Make return value a little more explicit

Doc/library/sqlite3.rst

index 5c9e2e868ab6326ff9cc09755d07728715fe5471..cbe7bb1fb9a0df62d4588cfc53072dce1ecac60a 100644 (file)
@@ -431,24 +431,21 @@ Connection Objects
 
    .. method:: execute(sql[, parameters])
 
-      This is a nonstandard shortcut that creates a cursor object by calling
-      the :meth:`~Connection.cursor` method, calls the cursor's
-      :meth:`~Cursor.execute` method with the *parameters* given, and returns
-      the cursor.
+      Create a new :class:`Cursor` object and call
+      :meth:`~Cursor.execute` on it with the given *sql* and *parameters*.
+      Return the new cursor object.
 
    .. method:: executemany(sql[, parameters])
 
-      This is a nonstandard shortcut that creates a cursor object by
-      calling the :meth:`~Connection.cursor` method, calls the cursor's
-      :meth:`~Cursor.executemany` method with the *parameters* given, and
-      returns the cursor.
+      Create a new :class:`Cursor` object and call
+      :meth:`~Cursor.executemany` on it with the given *sql* and *parameters*.
+      Return the new cursor object.
 
    .. method:: executescript(sql_script)
 
-      This is a nonstandard shortcut that creates a cursor object by
-      calling the :meth:`~Connection.cursor` method, calls the cursor's
-      :meth:`~Cursor.executescript` method with the given *sql_script*, and
-      returns the cursor.
+      Create a new :class:`Cursor` object and call
+      :meth:`~Cursor.executescript` on it with the given *sql_script*.
+      Return the new cursor object.
 
    .. method:: create_function(name, num_params, func, *, deterministic=False)