read text file byte by byte
sjdevnull at yahoo.com
sjdevnull at yahoo.com
Mon Dec 14 23:30:34 EST 2009
On Dec 14, 4:09 pm, Nobody <nob... at nowhere.com> wrote:
> On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn... at yahoo.com wrote:
> > The 3.1 documentation specifies that file.read returns bytes:
> > Does it need fixing?
>
> There are no file objects in 3.x.
Then the documentation definitely needs fixing; the excerpt I posted
earlier is from the 3.1 documentation's section about file objects:
http://docs.python.org/3.1/library/stdtypes.html#file-objects
Which begins:
"5.9 File Objects
File objects are implemented using C’s stdio package and can be
created with the built-in open() function. File objects are also
returned by some other built-in functions and methods, such as os.popen
() and os.fdopen() and the makefile() method of socket objects."
(It goes on to describe the read method's operation on bytes that I
quoted upthread.)
Sadly I'm not familiar enough with 3.x to suggest an appropriate edit.
More information about the Python-list
mailing list