[issue21717] Exclusive mode for ZipFile and TarFile

Antony Lee report at bugs.python.org
Wed Jun 11 12:26:20 CEST 2014


New submission from Antony Lee:

I noticed that while lzma and bz2 already support the "x" (create a new file, raise if it already exists) flag, zipfile and tarfile don't know about it yet.  It would be an useful addition, just as it is useful for regular open.

A quick look at both modules show that this likely only requires a little bit more than updating the checks in the corresponding constructors to allow "x" mode, as the modes are passed (nearly) transparently to the open() builtin.

----------
components: Library (Lib)
messages: 220249
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Exclusive mode for ZipFile and TarFile
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21717>
_______________________________________


More information about the Python-bugs-list mailing list