This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年11月03日 21:28 by t.steinruecken, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg120346 - (view) | Author: (t.steinruecken) | Date: 2010年11月03日 21:28 | |
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__'
>>>
|
|||
| msg120348 - (view) | Author: Alex Gaynor (alex) * (Python committer) | Date: 2010年11月03日 21:40 | |
Context manager support was added in 3.2 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:08 | admin | set | github: 54510 |
| 2010年11月03日 22:40:26 | ezio.melotti | set | nosy:
+ ezio.melotti stage: resolved |
| 2010年11月03日 21:42:28 | benjamin.peterson | set | status: open -> closed resolution: out of date |
| 2010年11月03日 21:40:17 | alex | set | nosy:
+ alex messages: + msg120348 |
| 2010年11月03日 21:28:56 | t.steinruecken | create | |