-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-17909: Document that json.load can accept a binary IO #7366
Conversation
Doc/library/json.rst
Outdated
@@ -262,6 +262,11 @@ Basic Usage | |||
.. versionchanged:: 3.6 | |||
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`. | |||
|
|||
.. versionchanged:: 3.6 | |||
*fp* can now be a :term:`file-like object` whose ``.read()`` method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use just :term:`binary file`
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can go with that, was mostly matching the verbiage above (load
after all only cares that the object has a .read()
method)
ac1c262
to
dd11bbf
Compare
@@ -262,6 +262,10 @@ Basic Usage | |||
.. versionchanged:: 3.6 | |||
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`. | |||
|
|||
.. versionchanged:: 3.6 | |||
*fp* can now be a :term:`binary file`. The input encoding should be | |||
UTF-8, UTF-16 or UTF-32. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO the feature should also be documented in the body of the function documentation, not also in this versionchanged note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, added!
dd11bbf
to
e976fea
Compare
@vstinner @serhiy-storchaka look good now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
) (cherry picked from commit bb6366b) Co-authored-by: Anthony Sottile <asottile@umich.edu>
GH-7474 is a backport of this pull request to the 3.7 branch. |
GH-7475 is a backport of this pull request to the 3.6 branch. |
) (cherry picked from commit bb6366b) Co-authored-by: Anthony Sottile <asottile@umich.edu>
https://bugs.python.org/issue17909