On Thu, Feb 4, 2021 at 3:29 PM Chris Angelico <ros...@gmail.com> wrote:

> With "t", it takes/gives Unicode objects, but with "b" it uses bytes.


Sure, in Python 3, but not in Python 2, or C.

Anyway, moral correctness is beside the point. People in point of fact
don't write encoding='utf-8' when they should, because it's so much to
type. If you had to write binary=True to enable binary mode, fewer people
would have bothered to use it in the Python 2 era, and there would have
been more portability (and Python 3 transition) problems. There shouldn't
have been, but there would have been. Everything about the mode parameter
is a sop to convenience. Really you should write open(mode=io.APPEND) or
something.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7ACOQP2RG75UMJB2BS3XPXC6PZ3UQGFW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to