[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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue9693 ___

[issue9693] asynchat push_callable() patch

2010-08-31 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com 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

[issue9693] asynchat push_callable() patch

2010-08-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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,

[issue9693] asynchat push_callable() patch

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

[issue9693] asynchat push_callable() patch

2010-08-30 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue9693] asynchat push_callable() patch

2010-08-26 Thread Giampaolo Rodola'
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)

[issue9693] asynchat push_callable() patch

2010-08-26 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9693 ___ ___ Python-bugs-list