bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) · python/cpython@af636f4 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit af636f4
authored and
committed
with the case of an existing file
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1119,6 +1119,9 @@ call fails (for example because the path doesn't exist). | ||
1119 | 1119 | >>> p.read_text() |
1120 | 1120 | 'Text file contents' |
1121 | 1121 | |
1122 | + An existing file of the same name is overwritten. The optional parameters | |
1123 | + have the same meaning as in :func:`open`. | |
1124 | + | |
1122 | 1125 | .. versionadded:: 3.5 |
1123 | 1126 | |
1124 | 1127 | Correspondence to tools in the :mod:`os` module |