Message253675
In Python3, fileinput.FileInput.readline() always returns str object at the end,
even if in 'rb' mode.
Here's a test code.
import fileinput
fi = fileinput.input('test_fileinput.py', mode='rb')
while True:
line = fi.readline()
assert isinstance(line, bytes)
if not len(line):
break
It fails in Python3.2 to 3.5.
I wrote a patch for this.
With it, the test above passes. |
|
| Date |
User |
Action |
Args |
| 2015-10-29 14:12:19 | Ryosuke Ito | set | recipients:
+ Ryosuke Ito |
| 2015-10-29 14:12:19 | Ryosuke Ito | set | messageid: <1446127939.75.0.173725539565.issue25510@psf.upfronthosting.co.za> |
| 2015-10-29 14:12:19 | Ryosuke Ito | link | issue25510 messages |
| 2015-10-29 14:12:19 | Ryosuke Ito | create | |
|