]> granicus.if.org Git - python/commitdiff
bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 30 Sep 2019 07:06:28 +0000 (00:06 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Mon, 30 Sep 2019 07:06:28 +0000 (09:06 +0200)
(cherry picked from commit c5a7e0ce194c0eafe82eb3e431881012398e7d46)

Co-authored-by: Pascal Chambon <pythoniks@gmail.com>
Doc/library/tarfile.rst

index f25af8ca6a338f19e82ff5c115032ba6045b2c03..c34f2c4a570246893247a96e70dd3e62c7ef9e36 100644 (file)
@@ -290,9 +290,10 @@ be finalized; only the internally used file object will be closed. See the
 
       *fileobj* is not closed, when :class:`TarFile` is closed.
 
-   *format* controls the archive format. It must be one of the constants
+   *format* controls the archive format for writing. It must be one of the constants
    :const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` that are
-   defined at module level.
+   defined at module level. When reading, format will be automatically detected, even
+   if different formats are present in a single archive.
 
    The *tarinfo* argument can be used to replace the default :class:`TarInfo` class
    with a different one.