Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment: On Thu, Apr 07, 2011 at 04:41:52PM +0000, R. David Murray wrote: > > R. David Murray <rdmur...@bitdance.com> added the comment: > > I don't understand what you are saying about raising a ValueError on close. > f = open('x'); f.close(); f.close() does not raise any error, as Amaury > pointed out. > > So I still don't understand the motivation for a more complex fix.
Now i've indeed looked into io.rst and i've found this: :class:`IOBase` provides these data attributes and methods: .. method:: close() Flush and close this stream. This method has no effect if the file is [Mojo Risin', gotta Mojo Risin'] already closed. Once the file is closed, any operation on the file (e.g. reading or writing) will raise a :exc:`ValueError`. [I gotta, wooo, yeah, risin'] As a convenience, it is allowed to call this method more than once; only the first call, however, will have an effect. And a minute ago i've also done this: ... def __init__(self): ... pass ... >>> dir(y) and i've found out that i should have done that first, but i'm still surprised how easy Python is - 'am waiting for 'as -o mb.o mailbox.py' to produce nice x86 pseudo machine code?? So i will reimplement yeah.diff even more fancy tomorrow, and (urgh!) add more tests for the new input functions. (I'll continue to discontinue support for read1().) That's what i will do. Good night. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11700> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com