Message160140
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. |
|
Date |
User |
Action |
Args |
2012-05-07 11:41:35 | pitrou | set | recipients:
+ pitrou, ezio.melotti, cbay |
2012-05-07 11:41:35 | pitrou | set | messageid: <1336390895.89.0.658255970323.issue9177@psf.upfronthosting.co.za> |
2012-05-07 11:41:34 | pitrou | link | issue9177 messages |
2012-05-07 11:41:34 | pitrou | create | |
|