[Python-checkins] cpython: Documenting that json.load may raise a ValueError.

david.wolever python-checkins at python.org
Tue Aug 13 00:13:40 CEST 2013


http://hg.python.org/cpython/rev/905fad4cb40a
changeset:   85144:905fad4cb40a
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
@@ -256,6 +256,8 @@
    The other arguments have the same meaning as in :func:`load`, except
    *encoding* which is ignored and deprecated.
 
+   If the data being deserialized is not a valid JSON document, a
+   :exc:`ValueError` will be raised.
 
 Encoders and Decoders
 ---------------------

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list