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, n=0)
| 151 | return self._mode == _MODE_WRITE |
| 152 | |
| 153 | def peek(self, n=0): |
| 154 | """Return buffered data without advancing the file position. |
| 155 | |
| 156 | Always returns at least one byte of data, unless at EOF. |
| 157 | The exact number of bytes returned is unspecified. |
| 158 | """ |
| 159 | self._check_can_read() |
| 160 | # Relies on the undocumented fact that BufferedReader.peek() |
| 161 | # always returns at least one byte (except at EOF), independent |
| 162 | # of the value of n |
| 163 | return self._buffer.peek(n) |
| 164 | |
| 165 | def read(self, size=-1): |
| 166 | """Read up to size uncompressed bytes from the file. |
nothing calls this directly
no test coverage detected