Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes:
> 
> I would hope that the C version could at least ensure that
> buffers are flushed properly without having to rely on any
> global variables, so that this would not be so much of an
> issue.

The C version cleans up after itself just fine :)
The issue is when someone defines a Python class derived from IOBase or one of
its descendants (RawIOBase, BufferedIOBase, TextIOBase), and overrides the
close() method.
(see e.g. SocketIO in socket.py, which incidentally defined its own __del__
while it could perhaps rely on RawIOBase to do the right thing)


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to