Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Document the dataclasses.field() change
  • Loading branch information
vstinner committed Feb 19, 2026
commit ddd1464fce06eaadf6e2028d3f748f78bfc2c6dc
4 changes: 4 additions & 0 deletions Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ Module contents
:attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and
:attr:`!C.y` will not be set.

.. versionchanged:: next
If *metadata* is ``None``, use an empty :class:`frozendict`, instead
of a :func:`~types.MappingProxyType` of an empty :class:`dict`.

.. class:: Field

:class:`!Field` objects describe each defined field. These objects
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:func:`dataclasses.field`: if *metadata* is ``None``, use an empty
:class:`frozendict`, instead of a :func:`~types.MappingProxyType` of an
empty :class:`dict`. Patch by Victor Stinner.
Loading