New submission from Nathaniel Gaertner <natgaert...@gmail.com>:

While looking at https://bugs.python.org/issue5758 I noticed that 'rt' support 
had been added to gzip and bz2 in 3.3, but FileInput still limited its mode 
options to 'r', 'rb', 'rU', and 'U'. It seems like 'rt' should be just fine 
here as well, and would help clarify issue 5758, since 'r' defaults to 'rt' for 
open(...) but defaults to 'rb' for gzip and bz2.

I wrote up the code and modified the mode unit test to try every allowed mode. 
I'll attach a PR to this once I have it ready.

----------
components: Library (Lib)
messages: 341978
nosy: natgaertner
priority: normal
severity: normal
status: open
title: FileInput does not allow 'rt' mode, but all its existing delegates do
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36865>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to