[New-bugs-announce] [issue9693] asynchat push_callable() patch

Giampaolo Rodola' report at bugs.python.org
Thu Aug 26 18:19:52 CEST 2010

New submission from Giampaolo Rodola' <g.rodola at 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()).

def log(msg):

class Sender(asynchat.async_chat):

    def __init__(self, conn):
        asynchat.async_chat.__init__(self, conn)
        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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list