summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-05 21:04:02 (GMT)
committerGitHub <noreply@github.com>2021-10-05 21:04:02 (GMT)
commit92450f23c6b2609ed40410c84cd4ed4e7ba72d4a (patch)
tree04460047ae505cb218e0a9e692c7d5bcf775afac
parent52d9d3b75441ae6038fadead89eac5eecdd34501 (diff)
downloadcpython-92450f23c6b2609ed40410c84cd4ed4e7ba72d4a.zip
cpython-92450f23c6b2609ed40410c84cd4ed4e7ba72d4a.tar.gz
cpython-92450f23c6b2609ed40410c84cd4ed4e7ba72d4a.tar.bz2
sqlite3: Modernize documentation around unicode and bytes. (GH-28652) (GH-28695)
(cherry picked from commit 1dac95c814763eb8a53896ac4326d8d51895d43d) Co-authored-by: Julien Palard <julien@palard.fr>
-rw-r--r--Doc/includes/sqlite3/text_factory.py4
-rw-r--r--Doc/library/sqlite3.rst4
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/includes/sqlite3/text_factory.py b/Doc/includes/sqlite3/text_factory.py
index a857a15..c0d87cd 100644
--- a/Doc/includes/sqlite3/text_factory.py
+++ b/Doc/includes/sqlite3/text_factory.py
@@ -3,9 +3,9 @@ import sqlite3
con = sqlite3.connect(":memory:")
cur = con.cursor()
-AUSTRIA = "\xd6sterreich"
+AUSTRIA = "Österreich"
-# by default, rows are returned as Unicode
+# by default, rows are returned as str
cur.execute("select ?", (AUSTRIA,))
row = cur.fetchone()
assert row[0] == AUSTRIA
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 4936df5..aeedcbe 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -513,8 +513,8 @@ Connection Objects
Using this attribute you can control what objects are returned for the ``TEXT``
data type. By default, this attribute is set to :class:`str` and the
- :mod:`sqlite3` module will return Unicode objects for ``TEXT``. If you want to
- return bytestrings instead, you can set it to :class:`bytes`.
+ :mod:`sqlite3` module will return :class:`str` objects for ``TEXT``.
+ If you want to return :class:`bytes` instead, you can set it to :class:`bytes`.
You can also set it to any other callable that accepts a single bytestring
parameter and returns the resulting object.