Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ Basic Usage
If ``True``, dictionaries will be outputted sorted by key.
Default ``False``.

.. note::

Keys in key/value pairs of JSON are always of the type :class:`str`. When
a dictionary is converted into JSON, all the keys of the dictionary are
converted to strings. As a result of this, if a dictionary is converted
into JSON and then back into a dictionary, the dictionary may not equal
the original one. That is, ``loads(dumps(x)) != x`` if x has non-string
keys. *sort_keys* sorts the keys before they are converted to strings,
so numeric keys are sorted by value, not by their string representation.

.. versionchanged:: 3.2
Allow strings for *indent* in addition to integers.

Expand All @@ -253,17 +263,6 @@ Basic Usage
table <py-to-json-table>`. The arguments have the same meaning as in
:func:`dump`.

.. note::

Keys in key/value pairs of JSON are always of the type :class:`str`. When
a dictionary is converted into JSON, all the keys of the dictionary are
coerced to strings. As a result of this, if a dictionary is converted
into JSON and then back into a dictionary, the dictionary may not equal
the original one. That is, ``loads(dumps(x)) != x`` if x has non-string
keys.
*sort_keys* sorts the keys before they are coerced to strings,
so numeric keys are sorted by value, not by their string representation.

.. function:: load(fp, *, cls=None, object_hook=None, parse_float=None, \
parse_int=None, parse_constant=None, \
object_pairs_hook=None, array_hook=None, **kw)
Expand Down
5 changes: 5 additions & 0 deletions Doc/library/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ However, for reading convenience, most of the examples show sorted sequences.
.. image:: kde_example.png
:alt: Scatter plot of the estimated probability density function.

Because the returned ``f_hat`` function is typically called many times,
it caches the *data* for performance. To support dynamic datasets, this
cache automatically refreshes whenever the length of the *data* changes.
This allows new samples to be added as they become available.

.. versionadded:: 3.13


Expand Down
Loading
Loading