You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
GitHub fields:
assignee=Noneclosed_at=<Date2010-11-03.21:42:28.791>created_at=<Date2010-11-03.21:28:56.442>labels= ['extension-modules', 'type-bug']
title='Zipfile cannot be used in "with" Statement'updated_at=<Date2010-11-03.22:40:26.573>user='https://bugs.python.org/tsteinruecken'
Using a ZipFile as a "with"-context dosnt work
(Im using the standard Ubuntu version of Python3.1)
Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from zipfile import ZipFile
>>> with ZipFile("test.zip","w") as z:
... z.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'ZipFile' object has no attribute '__exit__'
>>>
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: