You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/etrepum'closed_at=<Date2010-08-02.20:16:23.662>created_at=<Date2010-06-26.18:04:31.118>labels= ['library', 'docs']
title="json docstrings on 3.x still use 'unicode' and 'str'"updated_at=<Date2010-08-02.20:16:23.660>user='https://github.com/ezio-melotti'
In the json package there are still lot of docstrings that refer to 'unicode' and 'str' instead of 'str' and 'bytes' (AFAIU 'bytes' are not even allowed anymore in several places, so there should probably be only 'str' there).
A few examples:
in json/init.py:
If skipkeys is true then dict keys that are not basic types (str, unicode, int, float, bool, None) will be skipped instead of raising a TypeError.
If ensure_ascii is false, then the some chunks written to fp may be unicode instances, subject to normal Python str to unicode coercion rules.
in json/decoder.py:
Decode a JSON document from s (a str or unicode beginning with a JSON document) and return a 2-tuple of the Python representation and the index in s where the document ended.
in json/encoder.py:
If ensure_ascii is true, the output is guaranteed to be str objects with all incoming unicode characters escaped. If ensure_ascii is false, the output will be unicode object.
Note that the documentation (Doc/library/json.rst) seems already updated, so update the docstrings should be enough.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: