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.

Title: StringIO failure when reading a chunk of text without newlines
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: alexandre.vassalotti, benjamin.peterson, pitrou
Priority: normal Keywords:

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) * (Python committer) Date: 2009-02-14 22:31
>>> f = io.StringIO("a\r\n", newline=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/antoine/py3k/__svn__/Lib/", line 2007, in read
    res = self._decode_newlines(self._read(n), True)
  File "/home/antoine/py3k/__svn__/Lib/", line 1953, in
    return output
UnboundLocalError: local variable 'output' referenced before assignment
msg83144 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-03-04 21:38
This is fixed by the io-c branch merge. (r70152)
Date User Action Args
2022-04-11 14:56:45adminsetgithub: 49514
2009-03-04 21:38:57benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg83144
nosy: + benjamin.peterson
2009-02-14 22:31:40pitroucreate