Update open() docs with link to File Tutorial#21737
Conversation
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it.
|
Please don't use the term "file handle". |
|
Thanks for the comment @methane ! I've changed the wording from "file handle" to "file object" (the same phrasing in https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files ). Happy to change it again if you will give me more context for your comment. |
|
I am not sure
I think tut-files is not for "file object details", because io module document is "file object details". Could you suggest better phrasing for "tutorial"? |
|
When I first read the Maybe I could change the sentence to:
Once built, this will show to the user:
|
|
Since the Reading and Writing Files tutorial page contains documentation on how & when to use the Do you prefer this new phrasing? |
I prefere new phrasing to old one. Other option is "for tutorial", because people may expect "more examples for more complex use cases" when they see "more examples". |
|
@methane , I've changed my PR to the "more examples" option. I think it's a tad more clear and you seem to like it too. Please merge if you have no further concerns. |
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it. (cherry picked from commit 705f145) Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
|
GH-21780 is a backport of this pull request to the 3.9 branch. |
|
GH-21781 is a backport of this pull request to the 3.8 branch. |
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it. (cherry picked from commit 705f145) Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it. (cherry picked from commit 705f145) Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it. (cherry picked from commit 705f145) Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it.
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it.
Add a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the
withcontext manager vs without it.