Author ezio.melotti
Recipients bob.ippolito, ezio.melotti
Date 2010-06-26.18:04:28
SpamBayes Score 0.000106566
Marked as misclassified No
Message-id <1277575473.27.0.695567265942.issue9087@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-06-26 18:04:33ezio.melottisetrecipients: + ezio.melotti, bob.ippolito
2010-06-26 18:04:33ezio.melottisetmessageid: <1277575473.27.0.695567265942.issue9087@psf.upfronthosting.co.za>
2010-06-26 18:04:31ezio.melottilinkissue9087 messages
2010-06-26 18:04:28ezio.melotticreate