Antoine Pitrou wrote:
On Fri, 12 Oct 2012 11:13:23 -0700 Guido van Rossum guido@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.