[Python-ideas] The async API of the future: Reactors

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 13 02:17:28 CEST 2012


Antoine Pitrou wrote:

> On Fri, 12 Oct 2012 11:13:23 -0700
> Guido van Rossum <guido at python.org> wrote:
> 
>>ote that the callback is *not* a
>>designated method on the I/O object!
> 
> Why isn't it?

One reason might be that it more or less forces you to
subclass the I/O object, instead of just using one of
a few predefined ones for file, socket, etc.

Although this could be ameliorated by giving the standard
I/O objects the ability to have callbacks plugged into
them. Then you could use whichever style was most
convenient.

-- 
Greg



More information about the Python-ideas mailing list