[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2020-10-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: Sorry, I copied the wrong numbers. The doc change is here: https://github.com/python/cpython/commit/8218bd4caf683ee98c450a093bf171dbca6c4849 -- ___ Python tracker ___

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: I think this documentation enhancement was done under issue36642 (PR 12855). -- nosy: +iritkatriel ___ Python tracker ___ _

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2011-02-23 Thread R. David Murray
R. David Murray added the comment: "newline controls how universal newlines works (it only applies to text mode). It can be None, '', '\n', '\r', and '\r\n'..." Whereas splitlines says: "Return a list of the lines in the string, breaking at line boundaries." So if we are fixing docs, we need

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2011-02-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't see that, but the chances of changing either of these is quite low, so I suppose we should just document. -- ___ Python tracker ___

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2011-02-23 Thread R. David Murray
R. David Murray added the comment: On the other hand, I believe io is documented as only recognizing /r and /n, so its behavior matches its documentation. -- ___ Python tracker ___

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2011-02-23 Thread R. David Murray
R. David Murray added the comment: Your example got a little messed up. >>> list(io.StringIO('print 1\n\x0cprint 2\n\n')) ['print 1\n', '\x0cprint 2\n', '\n'] >>> 'print 1\n\x0cprint 2\n\n'.splitlines(True) ['print 1\n', '\x0c', 'print 2\n', '\n'] >>> list(io.StringIO('print 1\x0cprint 2\n\n'))

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2011-02-23 Thread Benjamin Peterson
New submission from Benjamin Peterson : For example: >>> 'print 1\n\x0cprint 2\n\n'.splitlines() ['print 1\n', '\x0cprint 2\n', '\n'] >>> list(io.StringIO('print 1\n\x0cprint 2\n\n')) I'm not sure which is preferable. -- components: IO, Interpreter Core messages: 129240 nosy: benjamin.