[Python-checkins] cpython (3.3): Documenting that json.load may raise a ValueError.
david.wolever
python-checkins at python.org
Tue Aug 13 00:28:27 CEST 2013
http://hg.python.org/cpython/rev/f8cf0f997dfa
changeset: 85146:f8cf0f997dfa
branch: 3.3
parent: 85141:1d4b02d8fa8a
user: Felix Crux <felixc at felixcrux.com>
date: Mon Aug 12 17:39:51 2013 -0400
summary:
Documenting that json.load may raise a ValueError.
Issue #18680: JSONDecoder should document that it raises a ValueError
for malformed data
files:
Doc/library/json.rst | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -328,6 +328,8 @@
those with character codes in the 0-31 range, including ``'\t'`` (tab),
``'\n'``, ``'\r'`` and ``'\0'``.
+ If the data being deserialized is not a valid JSON document, a
+ :exc:`ValueError` will be raised.
.. method:: decode(s)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list