diff -r 22f991bb9b0b Doc/library/asynchat.rst --- a/Doc/library/asynchat.rst Sun Mar 13 22:55:41 2011 +0200 +++ b/Doc/library/asynchat.rst Mon Mar 14 11:26:41 2011 -0400 @@ -62,11 +62,15 @@ an important breakpoint in, an incoming transmission from the remote endpoint. - To build a functioning :class:`async_chat` subclass your input methods + To build a functioning :class:`async_chat` subclass your input methods :meth:`collect_incoming_data` and :meth:`found_terminator` must handle the data that the channel receives asynchronously. The methods are described below. + .. versionchanged:: 2.6 + The *map* parameter has been added and *conn* was renamed to *sock*, + rendering the constructor identical to :class:`asyncore.dispatcher`'s. + .. method:: async_chat.close_when_done() @@ -89,11 +93,13 @@ .. method:: async_chat.found_terminator() - Called when the incoming data stream matches the termination condition set + Called when the incoming data stream matches the termination condition set by :meth:`set_terminator`. The default method, which must be overridden, raises a :exc:`NotImplementedError` exception. The buffered input data should be available via an instance attribute. + .. versionadded:: 2.6 + .. method:: async_chat.get_terminator() @@ -115,6 +121,8 @@ channel will consume this producer's data by calling its :meth:`more` method and send the data to the remote endpoint. + .. deprecated:: 2.6 + .. method:: async_chat.set_terminator(term) @@ -174,6 +182,11 @@ item. Returns ``False, None`` for an empty fifo. + .. deprecated:: 2.6 + Use :class:`collections.deque` instead. + + + .. _asynchat-example: asynchat Example