[Python-Dev] Python-Dev Digest, Vol 53, Issue 23
gnewsg at gmail.com
Sun Dec 9 11:52:46 CET 2007
Some things I would change in the docstrings:
> + A dispatcher object handles a single socket, processing connect,
> + accept, close, read and write events as defined by the child
> + handle_connect, handle_accept, handle_close, handle_read and
> + handle_write methods, respectively. The child may also define
> + handle_expt to handle exceptions raised during the communication
> + process.
handle_expt is used for managing of OOB (Out Of Band) data.
The method called when an unhandled exception is raised is
> + """Sets the socket.SO_REUSEADDR socket option, is possible
Typo ("IF possible").
> def handle_error(self):
> + """Internal method, do not override."""
I would change into: "Called when an exception is raised and not
otherwise handled. The default version prints a condensed traceback.",
the same thing reported in the doc.
> def handle_expt(self):
> + """Called to handle an exception event.
> + Children may override this method to implement exception
> + processing.
> + """
Like said above, this is called when arrived some OOB data.
I would change this into something like: "Called when some OOB data
More information about the Python-Dev