curiosa RE 1.5.2 and socket.error

Dave Harrison dave at nullcube.com
Thu May 8 17:42:02 EDT 2003


the other day I came across a strange problem with an exception in 1.5.2.

When socket.error was raised it returned either :
- A single tuple of a string (error description)
- A two tuple (string, error number)

However as far as the documentation read, if I was going to just get the first return value, it should simply be a string object.
To get to this single object however, I had to grab that arg value of the exception, and reference the first element of the one tuple (not what the doco described, or at least that's not how I read it).

Does anyone know what I missed ? Or was it an anomoly of 1.5.2 ??





More information about the Python-list mailing list