Skip to content

Commit b2a1f90

Browse files
authored
Update Doc/library/tarfile.rst
1 parent 4c90c51 commit b2a1f90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/tarfile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ in :meth:`TarFile.add`::
13311331

13321332
import sys
13331333
import tarfile
1334-
with tarfile.open("sample.tar.gz", "w:gz", fileobj=sys.stdout.buffer) as tar:
1334+
with tarfile.open("sample.tar.gz", "w|gz", fileobj=sys.stdout.buffer) as tar:
13351335
for name in ["foo", "bar", "quux"]:
13361336
tar.add(name)
13371337

0 commit comments

Comments
 (0)