[Python-ideas] Async API: some code to review

Andrew Svetlov andrew.svetlov at gmail.com
Mon Oct 29 19:02:09 CET 2012


Pollster has to support any object as file descriptor.
The use case is ZeroMQ sockets: they are implemented at user level and
socket is just some opaque structure wrapped by Python object.
ZeroMQ has own poll function to process zmq sockets as well as regular
sockets/pipes/files.

I would to see add_{reader,writer} and call_{soon,later} accepting
**kwargs as well as *args. At least to respect functions with
keyword-only arguments.

+1 for explicit passing loop instance and clearing role of DelayedCall.

Decorating coroutines with setting some flag looks good to me, but I
expect some problems with setting extra attribute to objects like
staticmethod/classmethod.

Thanks, Andrew.



More information about the Python-ideas mailing list