[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

Antoine Pitrou report at bugs.python.org
Thu Mar 20 00:45:50 CET 2014


Antoine Pitrou added the comment:

> Okay, different approach: How about having a mode argument with a
> default? (Defaults of 'rb', 'r', 'wb', 'w' respectively.)

This is redundant with the fact that there are several distinct methods:
{read,write}_{bytes,text}.

Really, the aim is to ease common operations, not to replace open()
entirely.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20218>
_______________________________________


More information about the Python-bugs-list mailing list