Skip to content
Open
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
59 changes: 37 additions & 22 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,33 @@ 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:`iter` | | | | :func:`__import__` |
| | :func:`bin` | | |func-frozendict|_ | | :func:`min` | | :func:`sentinel` |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's unfortunate that we have to make so many code changes for a single line :(

But, AFAIK there's no other way, see 29a92ab as an example.

Copy link
Copy Markdown
Author

@oyvindronningstad oyvindronningstad May 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to forego the empty space before the "G:", which will give a 2-line change instead. Your call.

Copy link
Copy Markdown
Author

@oyvindronningstad oyvindronningstad May 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0c3441a <- 2-line change alternative

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would using a list-table help for future edits?

https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table

| | :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` | | **T** |
| | :func:`chr` | | :func:`hasattr` | | :func:`open` | | |func-tuple|_ |
| | :func:`classmethod` | | :func:`hash` | | :func:`ord` | | :func:`type` |
| | :func:`compile` | | :func:`help` | | | | |
| | :func:`complex` | | :func:`hex` | | **P** | | **V** |
| | | | | | :func:`pow` | | :func:`vars` |
| | **D** | | **I** | | :func:`print` | | |
| | :func:`delattr` | | :func:`id` | | :func:`property` | | **Z** |
| | |func-dict|_ | | :func:`input` | | | | :func:`zip` |
| | :func:`dir` | | :func:`int` | | | | |
| | :func:`divmod` | | :func:`isinstance` | | | | **_** |
| | | | :func:`issubclass` | | | | :func:`__import__` |
| | | | :func:`iter` | | | | |
+-------------------------+-----------------------+-----------------------+-------------------------+

.. using :func:`dict` would create a link to another page, so local targets are
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()``
Expand Down Expand Up @@ -482,11 +484,11 @@ are always available. They are listed here in alphabetical order.
dict(iterable, /, **kwargs)
:noindex:

Create a new dictionary. The :class:`dict` object is the dictionary class.
Create a new mutable 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()
Expand Down Expand Up @@ -864,6 +866,19 @@ 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.


.. _func-frozenset:
.. class:: frozenset(iterable=(), /)
:noindex:
Expand Down
Loading