Return buffered data without advancing the file position. Always returns at least one byte of data, unless at EOF. The exact number of bytes returned is unspecified.
(self, size=-1)
| 188 | return self._mode == _MODE_WRITE |
| 189 | |
| 190 | def peek(self, size=-1): |
| 191 | """Return buffered data without advancing the file position. |
| 192 | |
| 193 | Always returns at least one byte of data, unless at EOF. |
| 194 | The exact number of bytes returned is unspecified. |
| 195 | """ |
| 196 | self._check_can_read() |
| 197 | # Relies on the undocumented fact that BufferedReader.peek() always |
| 198 | # returns at least one byte (except at EOF) |
| 199 | return self._buffer.peek(size) |
| 200 | |
| 201 | def read(self, size=-1): |
| 202 | """Read up to size uncompressed bytes from the file. |
nothing calls this directly
no test coverage detected