New submission from Alain Kalker <m...@dds.nl>: >>> f = open("test2.gz") >>> d = f.read() >>> f.close() >>> e = f.read() Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: I/O operation on closed file import gzip >>> f = gzip.open("test2.gz") >>> d = f.read() >>> f.close() >>> e = f.read() >>> e ''
To remain consistent with other file(-like) objects, I think 'GzipFile's should also raise a ValueError in cases like this. ---------- components: Library (Lib) messages: 115473 nosy: ack priority: normal severity: normal status: open title: GzipFile object should raise ValueError on .read() after .close() type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9759> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com