This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: json docstrings on 3.x still use 'unicode' and 'str'
Type: Stage: needs patch
Components: Documentation, Library (Lib) Versions: Python 3.1, Python 3.2
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bob.ippolito Nosy List: bob.ippolito, ezio.melotti, georg.brandl
Priority: normal Keywords:

Created on 2010-06-26 18:04 by ezio.melotti, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg108738 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-06-26 18:04
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/
  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/
  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/
  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.
msg112532 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-02 20:16
Fixed in r83560.
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53333
2010-08-02 20:16:23georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112532

resolution: fixed
2010-06-26 18:04:31ezio.melotticreate