]> granicus.if.org Git - python/commitdiff
Issue #4945: Improved the documenting of boolean arguments in the json module.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 30 Jun 2016 11:03:21 +0000 (14:03 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 30 Jun 2016 11:03:21 +0000 (14:03 +0300)
Based on patch by Gabriel Genellina.

1  2 
Doc/library/json.rst
Lib/json/__init__.py

index e8c00e8505e9cdb8d1603d6268046162fb066e8b,ee582667b60ff343ad9691384ccf70ddf1e08ff4..73824f838c336d15b4ce27ec3d1cd7624cf4d21f
@@@ -443,13 -437,11 +446,14 @@@ Encoders and Decoder
     .. versionchanged:: 3.4
        Use ``(',', ': ')`` as default if *indent* is not ``None``.
  
-    If specified, *default* is a function that gets called for objects that can't
-    otherwise be serialized.  It should return a JSON encodable version of the
-    object or raise a :exc:`TypeError`.
+    If specified, *default* should be a function that gets called for objects that
+    can't otherwise be serialized.  It should return a JSON encodable version of
+    the object or raise a :exc:`TypeError`.  If not specified, :exc:`TypeError`
+    is raised.
  
 +   .. versionchanged:: 3.6
 +      All parameters are now :ref:`keyword-only <keyword-only_parameter>`.
 +
  
     .. method:: default(o)
  
Simple merge