Message132953
> Something looks fishy: what happens if size is -1 and EOFError is not raised?
You're right - I missed that possibility. In that case, extrasize and offset get
updated incorrectly, which will break subsequent calls to seek() and tell().
However, it seems that subsequent reads work fine, because slicing a bytes object
with a too-large upper bound doesn't raise an exception.
The attached patch fixes this bug, and updates test_read1() to catch regressions. |
|
Date |
User |
Action |
Args |
2011-04-04 17:01:25 | nadeem.vawda | set | recipients:
+ nadeem.vawda, pitrou, vstinner, eric.araujo, alex, r.david.murray, gruszczy, dabeaz |
2011-04-04 17:01:25 | nadeem.vawda | set | messageid: <1301936485.6.0.268378912084.issue10791@psf.upfronthosting.co.za> |
2011-04-04 17:01:25 | nadeem.vawda | link | issue10791 messages |
2011-04-04 17:01:24 | nadeem.vawda | create | |
|