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

Ram Rachum report at bugs.python.org
Wed Mar 19 22:37:27 CET 2014


Ram Rachum added the comment:

Thanks for the code review Antoine.

It seems like the only non-trivial comment is regarding the `append` and `exclusive` arguments:

"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? I think it'll be really sad. I don't think that just because someone wants to use modes 'a' or 'x' it means that they should now write a with clause instead of using our one-liner. Just because something is made for convenience, doesn't mean it should be crippled.

----------

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


More information about the Python-bugs-list mailing list