[Python-Dev] Assign to errno allowed?

Guido van Rossum guido@python.org
Tue, 24 Sep 2002 11:27:46 -0400


> > Why is the error different the first time?  And why is this an
> > error at all?
> 
> The winsock library is not initialized the first time - it seems
> that socketmodule calls WSAStartup(), but I haven't looked at
> this in detail.

Oh well, that makes some sense.

> Also I think it's not worth to fix it, there's no use for select()
> on windows if you don't use sockets - you have to supply at least
> one socket descriptor (that's the cause for the second error above).

OK.

>  Although it could be argued whether it makes sense to simulate
> a Linux-compatible select for Windows.

Nah, it's been like this for a decade.

> >  On Linux, this is not an error.  (In fact, time.sleep()
> > uses this to sleep using subsecond precision.)
> 
> From my early Unix (actually Minix) experiments I remember
> that select(3) was the only possibility to do subsecond delays
> in Unix. Is this still the same today?

Probably.  HAVE_SELECT is the first thing tested in floatsleep().

--Guido van Rossum (home page: http://www.python.org/~guido/)