2.0 small docu bug

Ng Pheng Siong ngps at madcap.dyndns.org
Sun Nov 5 10:16:58 EST 2000


Hi,

Here's a minor docu bug in 2.0. In lib/bltin-file-objects.html, the
method close() was described thusly:

"Close the file. A closed file cannot be read or written anymore.
Any operation which requires that the file be open will raise an
IOError after the file has been closed. [...]"

But the implementation raises ValueError:

/usr/local/home/ngps/prog/m2/tests:$ python
Python 2.0 (#5, Oct 19 2000, 22:47:26) 
[GCC 2.95.2 19991024 (release)] on freebsd4
Type "copyright", "credits" or "license" for more information.
>>> f = open('xxx', 'wb')
>>> f.write('123')
>>> f.close()
>>> f.write('123')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: I/O operation on closed file
>>>   


-- 
Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps




More information about the Python-list mailing list