This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, facundobatista, terry.reedy
Date 2020-05-01.20:43:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588365785.18.0.833627394769.issue40382@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-05-01 20:43:05terry.reedysetrecipients: + terry.reedy, facundobatista, docs@python
2020-05-01 20:43:05terry.reedysetmessageid: <1588365785.18.0.833627394769.issue40382@roundup.psfhosted.org>
2020-05-01 20:43:05terry.reedylinkissue40382 messages
2020-05-01 20:43:05terry.reedycreate