[issue909005] asyncore fixes and improvements

Josiah Carlson report at bugs.python.org
Wed Apr 1 00:06:40 CEST 2009


Josiah Carlson <josiahcarlson at users.sourceforge.net> added the comment:

Just to make this clear, Aleksi is proposing close() should be called 
automatically by some higher-level functionality whether a user has 
overridden handle_close() or not.

With the updated asyncore warning suppression stuff, overriding 
handle_close() for the sake of suppressing the warnings should no longer 
be necessary.

While I can see that it would be *convenient* if close() was 
automatically called, the method is called "handle_close()", and there 
is an expectation about the implementation thereof.  For example, you 
call socket.recv() in handle_read(), you call socket.send() in 
handle_write(), call socket.accept() in handle_accept().  Is it too much 
to expect that a user will call .close() inside handle_close()?

The answer to that last question is a "no", btw.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue909005>
_______________________________________


More information about the Python-bugs-list mailing list