[issue4996] io.TextIOWrapper calls buffer.read1()
STINNER Victor
report at bugs.python.org
Mon Jan 19 17:57:54 CET 2009
STINNER Victor <victor.stinner at 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 <report at bugs.python.org>
<http://bugs.python.org/issue4996>
_______________________________________
More information about the Python-bugs-list
mailing list