]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149187: Document `frozendict()` under 'Built-in Functions' (#149185)
authorØyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Tue, 2 Jun 2026 13:55:16 +0000 (15:55 +0200)
committerGitHub <noreply@github.com>
Tue, 2 Jun 2026 13:55:16 +0000 (14:55 +0100)
Doc/library/functions.rst

index 0393e2dc776db4a36c204466ac96a3519b62a52c..def2a211d1b3b4d6ca2ca289f03d6728042a2845 100644 (file)
@@ -19,24 +19,25 @@ are always available.  They are listed here in alphabetical order.
 | |  :func:`ascii`        | |  :func:`filter`     | |  :func:`map`        | |  **S**                |
 | |                       | |  :func:`float`      | |  :func:`max`        | |  |func-set|_          |
 | |  **B**                | |  :func:`format`     | |  |func-memoryview|_ | |  :func:`setattr`      |
-| |  :func:`bin`          | |  |func-frozenset|_  | |  :func:`min`        | |  :func:`sentinel`     |
-| |  :func:`bool`         | |                     | |                     | |  :func:`slice`        |
-| |  :func:`breakpoint`   | |  **G**              | |  **N**              | |  :func:`sorted`       |
-| |  |func-bytearray|_    | |  :func:`getattr`    | |  :func:`next`       | |  :func:`staticmethod` |
-| |  |func-bytes|_        | |  :func:`globals`    | |                     | |  |func-str|_          |
-| |                       | |                     | |  **O**              | |  :func:`sum`          |
-| |  **C**                | |  **H**              | |  :func:`object`     | |  :func:`super`        |
-| |  :func:`callable`     | |  :func:`hasattr`    | |  :func:`oct`        | |  **T**                |
-| |  :func:`chr`          | |  :func:`hash`       | |  :func:`open`       | |  |func-tuple|_        |
-| |  :func:`classmethod`  | |  :func:`help`       | |  :func:`ord`        | |  :func:`type`         |
-| |  :func:`compile`      | |  :func:`hex`        | |                     | |                       |
-| |  :func:`complex`      | |                     | |  **P**              | |  **V**                |
-| |                       | |  **I**              | |  :func:`pow`        | |  :func:`vars`         |
-| |  **D**                | |  :func:`id`         | |  :func:`print`      | |                       |
-| |  :func:`delattr`      | |  :func:`input`      | |  :func:`property`   | |  **Z**                |
-| |  |func-dict|_         | |  :func:`int`        | |                     | |  :func:`zip`          |
-| |  :func:`dir`          | |  :func:`isinstance` | |                     | |                       |
-| |  :func:`divmod`       | |  :func:`issubclass` | |                     | |  **_**                |
+| |  :func:`bin`          | |  |func-frozendict|_ | |  :func:`min`        | |  :func:`sentinel`     |
+| |  :func:`bool`         | |  |func-frozenset|_  | |                     | |  :func:`slice`        |
+| |  :func:`breakpoint`   | |                     | |  **N**              | |  :func:`sorted`       |
+| |  |func-bytearray|_    | |  **G**              | |  :func:`next`       | |  :func:`staticmethod` |
+| |  |func-bytes|_        | |  :func:`getattr`    | |                     | |  |func-str|_          |
+| |                       | |  :func:`globals`    | |  **O**              | |  :func:`sum`          |
+| |  **C**                | |                     | |  :func:`object`     | |  :func:`super`        |
+| |  :func:`callable`     | |  **H**              | |  :func:`oct`        | |                       |
+| |  :func:`chr`          | |  :func:`hasattr`    | |  :func:`open`       | |  **T**                |
+| |  :func:`classmethod`  | |  :func:`hash`       | |  :func:`ord`        | |  |func-tuple|_        |
+| |  :func:`compile`      | |  :func:`help`       | |                     | |  :func:`type`         |
+| |  :func:`complex`      | |  :func:`hex`        | |  **P**              | |                       |
+| |                       | |                     | |  :func:`pow`        | |  **V**                |
+| |  **D**                | |  **I**              | |  :func:`print`      | |  :func:`vars`         |
+| |  :func:`delattr`      | |  :func:`id`         | |  :func:`property`   | |                       |
+| |  |func-dict|_         | |  :func:`input`      | |                     | |  **Z**                |
+| |  :func:`dir`          | |  :func:`int`        | |                     | |  :func:`zip`          |
+| |  :func:`divmod`       | |  :func:`isinstance` | |                     | |                       |
+| |                       | |  :func:`issubclass` | |                     | |  **_**                |
 | |                       | |  :func:`iter`       | |                     | |  :func:`__import__`   |
 +-------------------------+-----------------------+-----------------------+-------------------------+
 
@@ -44,6 +45,7 @@ are always available.  They are listed here in alphabetical order.
    used, with replacement texts to make the output in the table consistent
 
 .. |func-dict| replace:: ``dict()``
+.. |func-frozendict| replace:: ``frozendict()``
 .. |func-frozenset| replace:: ``frozenset()``
 .. |func-memoryview| replace:: ``memoryview()``
 .. |func-set| replace:: ``set()``
@@ -485,8 +487,8 @@ are always available.  They are listed here in alphabetical order.
    Create a new dictionary.  The :class:`dict` object is the dictionary class.
    See :class:`dict` and :ref:`typesmapping` for documentation about this class.
 
-   For other containers see the built-in :class:`list`, :class:`set`, and
-   :class:`tuple` classes, as well as the :mod:`collections` module.
+   For other containers see the built-in :class:`frozendict`, :class:`list`,
+   :class:`set`, and :class:`tuple` classes, as well as the :mod:`collections` module.
 
 
 .. function:: dir()
@@ -864,6 +866,21 @@ are always available.  They are listed here in alphabetical order.
       if *format_spec* is not an empty string.
 
 
+.. _func-frozendict:
+.. class:: frozendict(**kwargs)
+           frozendict(mapping, /, **kwargs)
+           frozendict(iterable, /, **kwargs)
+   :noindex:
+
+   Create a new frozen dictionary.  The :class:`frozendict` object is a built-in class.
+   See :class:`frozendict` and :ref:`typesmapping` for documentation about this class.
+
+   For other containers see the built-in :class:`dict`, :class:`list`, :class:`set`,
+   and :class:`tuple` classes, as well as the :mod:`collections` module.
+
+   .. versionadded:: 3.15
+
+
 .. _func-frozenset:
 .. class:: frozenset(iterable=(), /)
    :noindex: