Secret readinto() method for file objects?

Ryan LeCompte rmlecompte at hotmail.com
Mon May 21 02:29:20 EDT 2001


Hello all,


Just doing a simple test to see what's inside a file object in Python 2.1, 
and I find:

>>>file = open('test.txt', 'w')
>>>dir(file)
['close', 'closed', 'fileno', 'flush', 'isatty', 'mode', 'name', 'read', 
'readinto', 'readline', 'readlines', 'seek', 'softspace', 'tell', 
'truncate', 'write', 'writelines', 'xreadlines']
>>>file.readinto
<built-in method readinto of file object at 00B33060>
>>>file.readinto.__doc__
>>>

The above file object method has no helpful doc string, nor is it documented 
at http://www.python.org/doc/current/lib/bltin-file-objects.html

Has someone secretly developed a new standard file object method without 
letting us know? =)

Also... a side note: It would be nice if Python had doc strings for ALL of 
its builtin modules and their respective classes/methods/functions.

Thanks!

Ryan LeCompte
rmlecompte at hotmail.com
rml7669 at louisiana.edu

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





More information about the Python-list mailing list