[issue9693] asynchat push_callable() patch

Antoine Pitrou report at bugs.python.org
Mon Aug 30 22:13:23 CEST 2010


Antoine Pitrou <pitrou at 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 _Callable, then why do you write "hasattr(first, '__call__')" rather than simply "isinstance(first, _Callable)"?
- why override __bool__??

The API also looks a bit weird to me - the Twisted model of Deferreds is so much better - but why not.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9693>
_______________________________________


More information about the Python-bugs-list mailing list