Message 96566 - Python tracker (original) (raw)
Two things:
- since it implements common IO operations, the GzipFile class could inherit io.BufferedIOBase. It would also alleviate the need to reimplement readinto(): BufferedIOBase has a default implementation which should be sufficient.
- rather than
type(data) is memoryview
, the preferred idiom isisinstance(data, memoryview)
.