Author pitrou
Recipients cbay, ezio.melotti, pitrou
Date 2012-05-07.11:41:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't think mimicking EBADF is very useful. Reading from a closed socket is usually a programming error, so it's not the kind of error you'll want to catch at runtime.

AttributeError may not be very pretty though, so perhaps a ValueError can be raised as with closed files:

>>> f = open("LICENSE")
>>> f.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: I/O operation on closed file.
Date User Action Args
2012-05-07 11:41:35pitrousetrecipients: + pitrou, ezio.melotti, cbay
2012-05-07 11:41:35pitrousetmessageid: <>
2012-05-07 11:41:34pitroulinkissue9177 messages
2012-05-07 11:41:34pitroucreate