Issue #18726: All optional parameters of the dump(), dumps(),

load() and loads() functions and JSONEncoder and JSONDecoder class
constructors in the json module are now keyword-only.
This commit is contained in:
Serhiy Storchaka 2016-06-22 00:03:20 +03:00
parent 4335437506
commit aacd53f6cb
6 changed files with 36 additions and 12 deletions

View file

@ -101,7 +101,7 @@ class JSONEncoder(object):
"""
item_separator = ', '
key_separator = ': '
def __init__(self, skipkeys=False, ensure_ascii=True,
def __init__(self, *, skipkeys=False, ensure_ascii=True,
check_circular=True, allow_nan=True, sort_keys=False,
indent=None, separators=None, default=None):
"""Constructor for JSONEncoder, with sensible defaults.