Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/serhiy-storchaka'closed_at=<Date2015-03-25.08:11:46.943>created_at=<Date2014-06-11.10:26:20.641>labels= ['type-feature', 'library']
title='Exclusive mode for ZipFile and TarFile'updated_at=<Date2015-03-25.08:11:46.942>user='https://github.com/anntzer'
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.