[issue20218] Add `pathlib.Path.write` and `pathlib.Path.read`

Christopher Welborn report at bugs.python.org
Thu Jan 23 05:29:43 CET 2014


Christopher Welborn added the comment:

Ram Rachum (and to whom it may concern):

This patch was missing the size argument for readlines(), and it did not match the overall style of pathlib.py. (using ''' instead of """, and other docstring style). It also clobbered the builtin 'file'.

I've attached another patch that tries very hard to match that 'style', and wrote tests that try to match what the original 'io' functions test for.

This is my first patch for python-dev, I am attaching it in the hope it will help resolve the issue, or generate more discussion about it.

I ran both the individual test_pathlib tests, and the entire test suite. Also, the patchcheck sanity test.

----------
Added file: http://bugs.python.org/file33642/pathlib.readwrite.patch

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


More information about the Python-bugs-list mailing list