New submission from Ralph Broenink:
In Python 3.2, context manager support for ZipFile was added. However, I would
also love the ability for ``ZipFile.open`` to be used as a context manager,
e.g.:
from zipfile import ZipFile
with ZipFile("test.zip", "r") as z:
with z.open("test.txt", "r") as f:
print(f.read())
----------
components: Extension Modules
messages: 224914
nosy: Ralph.Broenink
priority: normal
severity: normal
status: open
title: ZipFile.open context manager support
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22154>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com