[issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin

2019-06-02 Thread Ezio Melotti


Ezio Melotti  added the comment:

Fixed, thanks for the report and the PRs!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [First easy issue] fileinput module should document that openhook and 
mode are ignored when reading from stdin -> fileinput module should document 
that openhook and mode are ignored when reading from stdin
type:  -> enhancement
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin

2019-05-22 Thread Grant Wu


New submission from Grant Wu :

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@python
components: Documentation
messages: 343221
nosy: Grant Wu2, docs@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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com