Skip to content

Commit 3f5f622

Browse files
gh-149187: Doc: Add frozendict to functions.rst
Add frozendict to the Built-in Functions table, and add a short entry on the page, derived from the dict and frozenset entries. Also, mention frozendict in the dict entry. Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
1 parent 025cc26 commit 3f5f622

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

Doc/library/functions.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ are always available. They are listed here in alphabetical order.
1919
| | :func:`ascii` | | :func:`filter` | | :func:`map` | | **S** |
2020
| | | | :func:`float` | | :func:`max` | | |func-set|_ |
2121
| | **B** | | :func:`format` | | |func-memoryview|_ | | :func:`setattr` |
22-
| | :func:`bin` | | |func-frozenset|_ | | :func:`min` | | :func:`sentinel` |
23-
| | :func:`bool` | | | | | | :func:`slice` |
22+
| | :func:`bin` | | |func-frozendict|_ | | :func:`min` | | :func:`sentinel` |
23+
| | :func:`bool` | | |func-frozenset|_ | | | | :func:`slice` |
2424
| | :func:`breakpoint` | | **G** | | **N** | | :func:`sorted` |
2525
| | |func-bytearray|_ | | :func:`getattr` | | :func:`next` | | :func:`staticmethod` |
2626
| | |func-bytes|_ | | :func:`globals` | | | | |func-str|_ |
@@ -44,6 +44,7 @@ are always available. They are listed here in alphabetical order.
4444
used, with replacement texts to make the output in the table consistent
4545
4646
.. |func-dict| replace:: ``dict()``
47+
.. |func-frozendict| replace:: ``frozendict()``
4748
.. |func-frozenset| replace:: ``frozenset()``
4849
.. |func-memoryview| replace:: ``memoryview()``
4950
.. |func-set| replace:: ``set()``
@@ -485,8 +486,8 @@ are always available. They are listed here in alphabetical order.
485486
Create a new dictionary. The :class:`dict` object is the dictionary class.
486487
See :class:`dict` and :ref:`typesmapping` for documentation about this class.
487488

488-
For other containers see the built-in :class:`list`, :class:`set`, and
489-
:class:`tuple` classes, as well as the :mod:`collections` module.
489+
For other containers see the built-in :class:`frozendict`, :class:`list`,
490+
:class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module.
490491

491492

492493
.. function:: dir()
@@ -864,6 +865,21 @@ are always available. They are listed here in alphabetical order.
864865
if *format_spec* is not an empty string.
865866

866867

868+
.. _func-frozendict:
869+
.. class:: frozendict(**kwargs)
870+
frozendict(mapping, /, **kwargs)
871+
frozendict(iterable, /, **kwargs)
872+
:noindex:
873+
874+
Create a new frozen dictionary. The :class:`frozendict` object is a built-in class.
875+
See :class:`frozendict` and :ref:`typesmapping` for documentation about this class.
876+
877+
For other containers see the built-in :class:`dict`, :class:`list`, :class:`set`,
878+
and :class:`tuple` classes, as well as the :mod:`collections` module.
879+
880+
.. versionadded:: 3.15
881+
882+
867883
.. _func-frozenset:
868884
.. class:: frozenset(iterable=(), /)
869885
:noindex:

0 commit comments

Comments
 (0)