[New-bugs-announce] [issue3860] GzipFile and BZ2File should support context manager protocol

Hagen Fürstenau report at bugs.python.org
Sat Sep 13 21:29:02 CEST 2008


New submission from Hagen Fürstenau <hfuerstenau at gmx.net>:

When you've become used to writing

with open("xzy", "w") as f: 

it's strange when it doesn't work for gzip.open or bz2.BZ2File.
Or is there a reason for them not being context managers?

----------
components: Library (Lib)
messages: 73194
nosy: hagen
severity: normal
status: open
title: GzipFile and BZ2File should support context manager protocol
type: feature request
versions: Python 2.6, Python 3.0

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


More information about the New-bugs-announce mailing list