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

R. David Murray report at bugs.python.org
Mon Feb 3 16:48:35 CET 2014


R. David Murray added the comment:

This requires (1) a doc update to indicate the problem and (2) a way to tell fileinput to *not* use readlines to optimize by calling readlines(bufsize), since in the case of using codecs it can be a problem.  Presumably buffer=None would be the logical way to spell this.
I'm marking this as a doc bug, a separate issue should be opened for adding the fileinput buffer=None enhancement.

(The codec module's comments indicate there's no practical way to implement sizehint.)

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python, r.david.murray
versions: +Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20501>
_______________________________________


More information about the Python-bugs-list mailing list