summaryrefslogtreecommitdiffstats
path: root/Doc/library/pathlib.rst
diff options
context:
space:
mode:
authorМаксим <maksvenberv@yandex.ru>2020-10-21 02:08:19 (GMT)
committerGitHub <noreply@github.com>2020-10-21 02:08:19 (GMT)
commit5f227413400c4dfdba210cc0f8c9305421638bc1 (patch)
tree38e93bae801217c8797740e01c68ed3811665eb9 /Doc/library/pathlib.rst
parent25492a5b59c5b74328278f195540e318ab87674f (diff)
downloadcpython-5f227413400c4dfdba210cc0f8c9305421638bc1.zip
cpython-5f227413400c4dfdba210cc0f8c9305421638bc1.tar.gz
cpython-5f227413400c4dfdba210cc0f8c9305421638bc1.tar.bz2
bpo-23706: Add newline parameter to pathlib.Path.write_text (GH-22420) (GH-22420)
* Add _newline_ parameter to `pathlib.Path.write_text()` * Update documentation of `pathlib.Path.write_text()` * Add test case for `pathlib.Path.write_text()` calls with _newline_ parameter passed Automerge-Triggered-By: GH:methane
Diffstat (limited to 'Doc/library/pathlib.rst')
-rw-r--r--Doc/library/pathlib.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index 9526a03..9de72bb 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1166,7 +1166,7 @@ call fails (for example because the path doesn't exist).
.. versionadded:: 3.5
-.. method:: Path.write_text(data, encoding=None, errors=None)
+.. method:: Path.write_text(data, encoding=None, errors=None, newline=None)
Open the file pointed to in text mode, write *data* to it, and close the
file::
@@ -1182,6 +1182,9 @@ call fails (for example because the path doesn't exist).
.. versionadded:: 3.5
+ .. versionchanged:: 3.10
+ The *newline* parameter was added.
+
Correspondence to tools in the :mod:`os` module
-----------------------------------------------