[docs] [issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin
report at bugs.python.org
Wed May 22 13:26:07 EDT 2019
New submission from Grant Wu <grant.wu at petuum.com>:
https://github.com/python/cpython/blob/master/Lib/fileinput.py#L326 shows that the openhook and mode are ignored when reading from stdin.
Since part of fileinput's functionality is to abstract over whether one is reading from stdin or over a file, I think this abstraction leak should be documented. One common use case where this might break is when attempting to set the file encoding using the included fileinput.hook_encoded functionality.
assignee: docs at python
nosy: Grant Wu2, docs at python
title: fileinput module should document that openhook and mode are ignored when reading from stdin
versions: Python 3.7
Python tracker <report at bugs.python.org>
More information about the docs