You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Doc] sqlite3 Cursor.execute() return value is unspecified #90923
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().
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.)
Activity
kephas commentedon Feb 16, 2022
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().
erlend-aasland commentedon Feb 16, 2022
Quoting the docs:
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.)
erlend-aasland commentedon Apr 17, 2022
After re-reading the current docs, I think a rewording might be helpful. I'll see if I can make things a little bit clearer.
pythongh-90923: Improve sqlite3.Connection.execute* docs
gh-90923: Improve sqlite3.Connection.execute* docs (#91643)
pythongh-90923: Improve sqlite3.Connection.execute* docs (pythonGH-91643
gh-90923: Improve sqlite3.Connection.execute* docs (GH-91643)
gh-90923: Improve sqlite3.Connection.execute* docs (GH-91643)
pythongh-90923: Improve sqlite3.Connection.execute* docs (pythonGH-91643