]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOB...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 20 May 2025 19:28:09 +0000 (21:28 +0200)
committerGitHub <noreply@github.com>
Tue, 20 May 2025 19:28:09 +0000 (12:28 -0700)
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)

Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
(cherry picked from commit 36eb711d2f26849214774a017fe8c8a5be3eec30)

Co-authored-by: Alex Kautz <alex@takemobi.com>
Doc/library/io.rst

index cca9b8bf869f2ac8fa54a67f5bad6fb61388231a..7f48abd75e2b7cd705cf16c7a2e1ecc8c7c6dc06 100644 (file)
@@ -879,9 +879,10 @@ Text I/O
 
    .. attribute:: buffer
 
-      The underlying binary buffer (a :class:`BufferedIOBase` instance) that
-      :class:`TextIOBase` deals with.  This is not part of the
-      :class:`TextIOBase` API and may not exist in some implementations.
+      The underlying binary buffer (a :class:`BufferedIOBase`
+      or :class:`RawIOBase` instance) that :class:`TextIOBase` deals with.
+      This is not part of the :class:`TextIOBase` API and may not exist
+      in some implementations.
 
    .. method:: detach()