[Python-Dev] socket.error should be an IOError?

Ka-Ping Yee ping@lfw.org
Sat, 18 Nov 2000 13:57:31 -0800 (PST)


In socketmodule, socket.error is currently just a plain old error
(derived only from Exception).  Looks to me like it should be an IOError.
Do you agree?

 line 2379 of socketmodule.c:

­­­­­­­d = PyModule_GetDict(m);
­­­­­­­PySocket_Error = PyErr_NewException("socket.error", NULL, NULL);
­­­­­­­if (PySocket_Error == NULL)

...just change that first NULL to PyExc_IOError.



-- ?!ng

"All models are wrong; some models are useful."
    -- George Box