This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [Doc] sqlite3 Cursor.execute() return value is unspecified
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: erlendaasland, kephas
Priority: normal Keywords:

Created on 2022-02-16 11:16 by kephas, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg413327 - (view) Author: Pierre Thierry (kephas) Date: 2022-02-16 11:16
In the documentation of the sqlite3 module, the return value for Connection.execute() is told to be the Cursor that was implicitly created, but nothing is said about the return value/type when using Cursor.execute().
msg413332 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2022-02-16 14:38
Quoting the docs:

> This is a nonstandard shortcut that creates a cursor object by calling the
> cursor() method, calls the cursor’s execute() method with the parameters
> given, and returns the cursor.

There is already a backlink (or back reference) to the Connection.cursor() method, which again has a backlink to the Cursor class. What would you suggest to make things clearer?

How about the following rewording:

"[...] and returns the newly created cursor object".

(IMO this is too verbose; I'm fine with the current docs.)
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 90923
2022-02-16 14:38:06erlendaaslandsetnosy: + erlendaasland
messages: + msg413332
2022-02-16 11:16:39kephascreate