[Python-3000] Draft PEP for New IO system
Guido van Rossum
guido at python.org
Tue Feb 27 23:39:12 CET 2007
On 2/27/07, Jim Jewett <jimjjewett at gmail.com> wrote:
> On 2/27/07, Guido van Rossum <guido at python.org> wrote:
> > On 2/27/07, Jim Jewett <jimjjewett at gmail.com> wrote:
> > > Therefore, normal code can ignore the possibility, or (to be really
> > > robust against someone else messing with the input stream) add an "if
> > > result is None: continue" clause to its loops.
> > No, since that would mean busy-waiting while the I/O isn't ready,
> Then should I assume that:
> (1) Read with a timeout is in the "better know your concrete object" category.
Using these shouldn't necessarily need to be (but you *should* know to
expect EWOULDBLOCK); but setting the timeout should be, yes.
> (2) Dealing with possibly unready objects in a library/framework
> (yield the timeslot?) should generally be framework specific.
Yeah, event loop business typically is.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000