From 0a48dd6f8ed148d5ee56793f5c8b716590796b37 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 17 Apr 2022 21:46:16 +0200 Subject: [PATCH 1/2] gh-90923: Improve sqlite3.Connection.execute* docs - Drop 'nonstandard'; it does not add any value - Try to be more concise - Make return value a little more explicit --- Doc/library/sqlite3.rst | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 5c9e2e868ab632..97e6dc56a38b57 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -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. + Creates a new :class:`Cursor` object and calls + :meth:`~Cursor.execute` on it with the given *sql* and *parameters*. + Returns 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. + Creates a new :class:`Cursor` object and calls + :meth:`~Cursor.executemany` on it with the given *sql* and *parameters*. + Returns 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. + Creates a new :class:`Cursor` object and calls + :meth:`~Cursor.executescript` on it with the given *sql_script*. + Returns the new cursor object. .. method:: create_function(name, num_params, func, *, deterministic=False) From 81ec1daf56321521a9879476177e04cdc3a4b517 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sun, 17 Apr 2022 22:40:12 +0200 Subject: [PATCH 2/2] Address review: use imperative mood --- Doc/library/sqlite3.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 97e6dc56a38b57..cbe7bb1fb9a0df 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -431,21 +431,21 @@ Connection Objects .. method:: execute(sql[, parameters]) - Creates a new :class:`Cursor` object and calls + Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it with the given *sql* and *parameters*. - Returns the new cursor object. + Return the new cursor object. .. method:: executemany(sql[, parameters]) - Creates a new :class:`Cursor` object and calls + Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on it with the given *sql* and *parameters*. - Returns the new cursor object. + Return the new cursor object. .. method:: executescript(sql_script) - Creates a new :class:`Cursor` object and calls + Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` on it with the given *sql_script*. - Returns the new cursor object. + Return the new cursor object. .. method:: create_function(name, num_params, func, *, deterministic=False)