[docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded

Gunnar Aastrand Grimnes report at bugs.python.org
Wed Feb 5 15:12:48 CET 2014

Gunnar Aastrand Grimnes added the comment:

Agreed that a doc-fix is the first step. 

Shall I make another issue for the fix in fileinput?

 I also wonder if the comment in codecs is not too negative - it is not easy to get it 100% right, but the method just above readlines is readline, which does somehow manage to read a single line. To me it seems like it would be better to makes readlines repeatedly call readline. It would also be inefficient, but still better than reading the whole (possibly infinite) stream in ...


Python tracker <report at bugs.python.org>

More information about the docs mailing list