[issue9693] asynchat push_callable() patch

2014-06-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yeah, I don't think this is worth it anymore. Closing as won't fix. -- assignee: -> giampaolo.rodola resolution: -> wont fix status: open -> closed ___ Python tracker _

[issue9693] asynchat push_callable() patch

2014-06-15 Thread Mark Lawrence
Mark Lawrence added the comment: Is this ever likely to get applied given the arrival of asyncio? -- nosy: +BreamoreBoy ___ Python tracker ___

[issue9693] asynchat push_callable() patch

2010-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > - why override __bool__?? > > I did that for performance. > Considering that initiate_send() method is called many times, and that > it is almost always used to send data rather than firing functions I > wanted to avoid to call isinstance(first, _Callable)

[issue9693] asynchat push_callable() patch

2010-08-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Thanks for the comments. > I don't understand what _Callable is used for; why not just a tuple? _Callable is just a container to store function, args and kwargs objects. I thought it made more sense than using a tuple because it's intrinsically callable.

[issue9693] asynchat push_callable() patch

2010-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - the signature in the doc is not the same as in the code: (fun, args, kwds) instead of (fun, *args, **kwds) - I don't understand what _Callable is used for; why not just a tuple? (or a function if you prefer) - if you use _Callable, then why do

[issue9693] asynchat push_callable() patch

2010-08-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Updated patch which fixes a little test error. -- Added file: http://bugs.python.org/file18683/asynchat-push-callable.patch ___ Python tracker __

[issue9693] asynchat push_callable() patch

2010-08-26 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9693] asynchat push_callable() patch

2010-08-26 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : 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(asynch