diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index d06a39a..49a2760 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -91,6 +91,11 @@ All of the classes in this module may safely be accessed from multiple threads. byte of data will be returned (unless at EOF). The exact number of bytes returned is unspecified. + Calling a :class:`BZ2File` object's :meth:`peek` method does not advance + its position, but the :term:`file object` may be affected. The caller + may wish to save the file object position prior to calling :meth:`peek` + and resetting it upon return. + .. versionadded:: 3.3 .. versionchanged:: 3.1 diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 2cbd2d5..1cddb16 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -113,6 +113,11 @@ The module defines the following items: the call. The number of bytes returned may be more or less than requested. + Calling a :class:`GzipFile` object's :meth:`peek` method does not advance + its position, but the *fileobj* may be affected. The caller may wish to + save the *fileobj* position prior to calling :meth:`peek` and resetting + it upon return. + .. versionadded:: 3.2 .. versionchanged:: 3.1 diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index 5fd5039..40fa190 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -98,6 +98,11 @@ Reading and writing compressed files byte of data will be returned, unless EOF has been reached. The exact number of bytes returned is unspecified (the *size* argument is ignored). + Calling a :class:`LZMAFile` object's :meth:`peek` method does not advance + its position, but the :term:`file object` may be affected. The caller + may wish to save the file object position prior to calling :meth:`peek` + and resetting it upon return. + Compressing and decompressing data in memory --------------------------------------------