Antoine Pitrou added the comment:

> 1. The read mode is not the default mode as mentioned in the
> docs.python.org.

It is. If you don't mention a mode, the mode is "r" by default. But if you 
mention a mode, then you are required to specify one of "r", "w", "a".

> io.BufferedReader does not implement read1 (the last lines of trace
> below)

It does. You made a mistake in your experiment (you called read1() on a FileIO 
object, not a BufferedReader object).

> io.FileIO does not implements single OS system call on read() - instead
> reads a file until EOF i.e. ignores the arguments supplied to read() 

Your experiments show otherwise, the argument supplied to read() is observed: 
if you call read(1024), at most 1024 bytes are returned, etc.

It's only if you call read() without an argument that the file is being read 
until EOF.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17440>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to