https://github.com/python/cpython/commit/bb0a8575a7194e982e3dce6eb02600889f9e9f04
commit: bb0a8575a7194e982e3dce6eb02600889f9e9f04
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: methane <songofaca...@gmail.com>
date: 2025-05-03T11:38:35+09:00
summary:

gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)

Document how TextIOWrapper interacts with UTF-8 mode
(cherry picked from commit 245cd6c53278006fa34fd7799d32f0884eb7e75d)

Co-authored-by: Malcolm Smith <sm...@chaquo.com>

files:
M Doc/library/io.rst

diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index f793d7a7ef9a84..cca9b8bf869f2a 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -950,7 +950,8 @@ Text I/O
    :class:`TextIOBase`.
 
    *encoding* gives the name of the encoding that the stream will be decoded or
-   encoded with.  It defaults to :func:`locale.getencoding`.
+   encoded with.  In :ref:`UTF-8 Mode <utf8-mode>`, this defaults to UTF-8.
+   Otherwise, it defaults to :func:`locale.getencoding`.
    ``encoding="locale"`` can be used to specify the current locale's encoding
    explicitly. See :ref:`io-text-encoding` for more information.
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to