[Python-Dev] Assign to errno allowed?

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


> Patched python:
> 
> Python 2.3a0 (#29, Sep 19 2002, 12:38:34) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import select
> >>> select.select([], [], [], 10)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> select.error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed')
> >>> import socket
> >>> select.select([], [], [], 10)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> select.error: (10022, 'An invalid argument was supplied')
> >>>

Hm...  I can confirm this on my Win98SE box.  But questions pop up:

Why is the error different the first time?  And why is this an
error at all?  On Linux, this is not an error.  (In fact, time.sleep()
uses this to sleep using subsecond precision.)

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