This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients cbay, ezio.melotti, pitrou
Date 2012-05-07.11:41:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336390895.89.0.658255970323.issue9177@psf.upfronthosting.co.za>
In-reply-to
Content
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()
>>> f.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: I/O operation on closed file.
History
Date User Action Args
2012-05-07 11:41:35pitrousetrecipients: + pitrou, ezio.melotti, cbay
2012-05-07 11:41:35pitrousetmessageid: <1336390895.89.0.658255970323.issue9177@psf.upfronthosting.co.za>
2012-05-07 11:41:34pitroulinkissue9177 messages
2012-05-07 11:41:34pitroucreate