[New-bugs-announce] [issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin
Grant Wu
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
components: Documentation
messages: 343221
nosy: Grant Wu2, docs at python
priority: normal
severity: normal
status: open
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>
<https://bugs.python.org/issue37014>
_______________________________________
More information about the New-bugs-announce
mailing list