STINNER Victor <victor.stin...@haypocalc.com> added the comment: Usage of read1(): * _BytesIO.read1(n) (_bytesio.c): calls bytesio_read(n) * _BytesIO.read1(n) (io.py): return self.read(n) * BufferedReader._read_unlocked(n=None): - if n is None or n==-1, call self.raw.read() in a "while True: ..." until EOF - else, call self.raw.read() until we get enough bytes * BufferedReader.read1(n): calls self._read_unlocked(...) but make sure that we don't call self.raw.read() more than once * BufferedRWPair.read1(n): return self.reader.read1(n) * BufferedRandom.read1(n): self.flush(); return BufferedReader.read1 (self, n) * TextIOWrapper._read_chunk() calls self.buffer.read1 (self._CHUNK_SIZE)
IOBase, RawIOBase, FileIO, BufferedIOBase, TextIOBase, TextIOWrapper, StringIO have no read1() method. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4996> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com