gh-149611: Explain return values for Path.write_text() and Path.write_bytes()#149629
gh-149611: Explain return values for Path.write_text() and Path.write_bytes()#149629nedbat merged 4 commits intopython:mainfrom
Path.write_text() and Path.write_bytes()#149629Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Documentation build overview
|
|
Thanks. I would have thought "Returns" was more correct (file objects' write() docstring uses "Returns"), but there are more "Return" in the .rst files than "Returns", so this is good to go. |
Glad to have contributed... Indeed at first look I thought |
|
(Updating the branch to fix possible CI failures) |
pathlib.Path.write_textandpathlib.Path.write_bytesboth return an integer from the underlying file object's.write()call (number of characters and number of bytes, respectively), but neither the Sphinx documentation nor the docstrings mention this.Issue - #149611