Issue 5264: StringIO failure when reading a chunk of text without newlines
Created on 2009-02-14 22:31 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg82131 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2009-02-14 22:31 | |
>>> f = io.StringIO("a\r\n", newline=None)
>>> f.read(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/antoine/py3k/__svn__/Lib/io.py", line 2007, in read
res = self._decode_newlines(self._read(n), True)
File "/home/antoine/py3k/__svn__/Lib/io.py", line 1953, in
_decode_newlines
return output
UnboundLocalError: local variable 'output' referenced before assignment
|
|||
| msg83144 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2009-03-04 21:38 | |
This is fixed by the io-c branch merge. (r70152) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:45 | admin | set | github: 49514 |
| 2009-03-04 21:38:57 | benjamin.peterson | set | status: open -> closed resolution: fixed messages: + msg83144 nosy: + benjamin.peterson |
| 2009-02-14 22:31:40 | pitrou | create | |
