[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`
Antoine Pitrou
report at bugs.python.org
Wed Mar 19 23:00:35 CET 2014
Antoine Pitrou added the comment:
> "I don't think "append" and "exclusive" deserve to be arguments here.
> write_bytes()/write_text() is a convenience method for the common use case."
>
> Are you suggesting that these features be removed?
Yes.
For "append", the reason is simple. The use case for appending is really
repeated appending (e.g. writing to a log file), so providing a
convenience for one-shot appending doesn't make sense.
For "exclusive", it's not used often enough to warrant such a shortcut.
I don't want these APIs to become kitchen sink APIs.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20218>
_______________________________________
More information about the Python-bugs-list
mailing list