New submission from Giampaolo Rodola' <g.rod...@gmail.com>: This can be useful in those circumstances where the user wants to execute some action right after some data has been sent (push()) or a producer has been consumed (push_with_producer()). Example:
def log(msg): logging.debug(msg) class Sender(asynchat.async_chat): def __init__(self, conn): asynchat.async_chat.__init__(self, conn) self.set_terminator("\r\n") self.push("220 hello\r\n") self.push_callable(log, "hello has been sent") ---------- components: Library (Lib) files: asynchat-push-callable.patch keywords: patch, patch messages: 115001 nosy: giampaolo.rodola, josiah.carlson, josiahcarlson, nirs, r.david.murray priority: normal severity: normal stage: patch review status: open title: asynchat push_callable() patch type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18651/asynchat-push-callable.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9693> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com