From 0651936ae2bc6999f488f8c519b8d07a06a11557 Mon Sep 17 00:00:00 2001 From: Stanley <46876382+slateny@users.noreply.github.com> Date: Wed, 27 Dec 2023 09:16:36 -0800 Subject: gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610) --- Lib/tarfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Lib/tarfile.py') diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 5ada0ad626b..20e0394507f 100755 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -330,10 +330,11 @@ class _LowLevelFile: class _Stream: """Class that serves as an adapter between TarFile and a stream-like object. The stream-like object only - needs to have a read() or write() method and is accessed - blockwise. Use of gzip or bzip2 compression is possible. - A stream-like object could be for example: sys.stdin, - sys.stdout, a socket, a tape device etc. + needs to have a read() or write() method that works with bytes, + and the method is accessed blockwise. + Use of gzip or bzip2 compression is possible. + A stream-like object could be for example: sys.stdin.buffer, + sys.stdout.buffer, a socket, a tape device etc. _Stream is intended to be used only internally. """ -- cgit v1.2.3