From: Nadeem Vawda Date: Sun, 8 Dec 2013 18:50:05 +0000 (+0100) Subject: Closes #18430: Document that peek() may change the position of the underlying X-Git-Tag: v3.4.0b2~293 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd6932a576e643c8aad8c0b4a044655882ebb27d;p=thirdparty%2FPython%2Fcpython.git Closes #18430: Document that peek() may change the position of the underlying file for the BZ2File, GzipFile and LZMAFile classes. --- bd6932a576e643c8aad8c0b4a044655882ebb27d diff --cc Doc/library/lzma.rst index 53fba89f1a66,07b69eb772a1..b71051da85c1 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@@ -102,9 -98,11 +102,14 @@@ Reading and writing compressed file byte of data will be returned, unless EOF has been reached. The exact number of bytes returned is unspecified (the *size* argument is ignored). + .. note:: While calling :meth:`peek` does not change the file position of + the :class:`LZMAFile`, it may change the position of the underlying + file object (e.g. if the :class:`LZMAFile` was constructed by passing a + file object for *filename*). + + .. versionchanged:: 3.4 + Added support for the ``"x"`` and ``"xb"`` modes. + Compressing and decompressing data in memory --------------------------------------------