Skip to content

Commit c5a7e0c

Browse files
pakalgpshead
authored andcommitted
bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389)
1 parent c816503 commit c5a7e0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/tarfile.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ be finalized; only the internally used file object will be closed. See the
290290

291291
*fileobj* is not closed, when :class:`TarFile` is closed.
292292

293-
*format* controls the archive format. It must be one of the constants
293+
*format* controls the archive format for writing. It must be one of the constants
294294
:const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` that are
295-
defined at module level.
295+
defined at module level. When reading, format will be automatically detected, even
296+
if different formats are present in a single archive.
296297

297298
The *tarinfo* argument can be used to replace the default :class:`TarInfo` class
298299
with a different one.

0 commit comments

Comments
 (0)