On 7/12/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> On 7/12/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
> > Joe Gregorio wrote:
> > > flush() raises
> > > ValueError() if the file is already closed,
> > >
> > > Should io.py raise OSError instead of ValueError?
> >
> > Is it really necessary to raise anything at all?
> > An already-closed file is as flushed as it can
> > get, so why not just let it be a no-op?
>
> I like that much better. So close() shouldn't try to flush() if it's
> already closed. This means fixing io.py. (Unfortunately it's a bit of
> a mess, a bit of refactoring would do it good.)

Thanks for the guidance.

This patch fixes mmap and also changes io.py
so that close() doesn't flush if it's already closed.
I did run both test_io.py and test_file.py when checking
the changes to io.py.

http://www.python.org/sf/1752647

   Thanks,
   -joe

-- 
Joe Gregorio        http://bitworking.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to