Terry J. Reedy <tjre...@udel.edu> added the comment:

The inconsistency might be a residue of the transition from 2.x.  But the 'r' 
versus 'rt' confusion originates in the code and signature.   The text 't' 
default is built into the code, while the read 'r' default is in the 'mode=r' 
part of the signature.

If text 't' were only a signature default, from 'mode=rt', then changing 
'read-text' to 'something_else-text' would require including the 't', as in 
'wt', etc.  But it is not.  On the other hand, passing mode as 'b' or using 
'mode=b' is a ValueError because one of 'r', 'w', or 'a', optionally followed 
by '+', is required.

I think the doc entry for open might stand a change to make this a bit clearer, 
but I don't have a specific proposal yet.

----------
nosy: +terry.reedy

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

Reply via email to