From: Serhiy Storchaka Date: Thu, 30 Jun 2016 11:03:21 +0000 (+0300) Subject: Issue #4945: Improved the documenting of boolean arguments in the json module. X-Git-Tag: v3.6.0a3~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee047e589d0121e2374111b1b4744c5b0d5c42bf;p=python Issue #4945: Improved the documenting of boolean arguments in the json module. Based on patch by Gabriel Genellina. --- ee047e589d0121e2374111b1b4744c5b0d5c42bf diff --cc Doc/library/json.rst index e8c00e8505,ee582667b6..73824f838c --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@@ -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 `. + .. method:: default(o)