From 1913fb0864ec04af59e359dac6d02421c5f820d1 Mon Sep 17 00:00:00 2001 From: Jia Junjie <62194633+jiajunjie@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:47:54 +0800 Subject: [PATCH] gh-97661: Improve accuracy of sqlite3.Cursor.fetchone docs (GH-97662) Co-authored-by: C.A.M. Gerlach (cherry picked from commit 4b83cd0b22428fbfccf1f0e85c0fc36be6ab7edf) Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com> --- Doc/library/sqlite3.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 70cf43c2544e8c..8fdb75349540c9 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1412,7 +1412,9 @@ Cursor objects .. method:: fetchone() - Return the next row of a query result set as a :class:`tuple`. + If :attr:`~Connection.row_factory` is ``None``, + return the next row query result set as a :class:`tuple`. + Else, pass it to the row factory and return its result. Return ``None`` if no more data is available.