[issue5266] StringIO.read(n) does not enforce requested size in newline mode

2009-03-04 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is fixed by the io-c branch merge. (r70152) -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker

[issue5266] StringIO.read(n) does not enforce requested size in newline mode

2009-02-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : Or, more precisely, it returns less than the requested number of characters because characters are counted before translating newlines: >>> f = io.StringIO("a\r\nb\r\n", newline=None) >>> f.read(3) 'a\n' TextIOWrapper gets it right: >>> g = io.TextIOWrapper