summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.2.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.2.rst')
-rw-r--r--Doc/whatsnew/3.2.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index 8901b5c..94257ae 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -1344,7 +1344,7 @@ function can return *None*::
tarinfo.uname = 'monty' # redact the user name
return tarinfo
- >>> with tarfile.TarFile(name='myarchive.tar', mode='w') as tf:
+ >>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:
for filename in glob.glob('*.txt'):
tf.add(filename, filter=myfilter)
tf.list()