https://github.com/python/cpython/commit/bd2f518555e8da6690757645e6b8dde932e1a41d
commit: bd2f518555e8da6690757645e6b8dde932e1a41d
branch: 3.13
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: sobolevn <m...@sobolevn.me>
date: 2025-04-07T14:52:55Z
summary:

[3.13] gh-132221: Fix `__match_args__` generation docs in `dataclasses.rst` 
(GH-132222) (#132226)

gh-132221: Fix `__match_args__` generation docs in `dataclasses.rst` (GH-132222)
(cherry picked from commit 8b62374b344f5da852bed9f16619736d4d43936b)

Co-authored-by: sobolevn <m...@sobolevn.me>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index 8b1c30af193d31..134ba0fa9b4b9f 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -164,7 +164,7 @@ Module contents
 
    - *match_args*: If true (the default is ``True``), the
      :attr:`~object.__match_args__` tuple will be created from the list of
-     parameters to the generated :meth:`~object.__init__` method (even if
+     non keyword-only parameters to the generated :meth:`~object.__init__` 
method (even if
      :meth:`!__init__` is not generated, see above).  If false, or if
      :attr:`!__match_args__` is already defined in the class, then
      :attr:`!__match_args__` will not be generated.
@@ -175,11 +175,12 @@ Module contents
      fields will be marked as keyword-only.  If a field is marked as
      keyword-only, then the only effect is that the :meth:`~object.__init__`
      parameter generated from a keyword-only field must be specified
-     with a keyword when :meth:`!__init__` is called.  There is no
-     effect on any other aspect of dataclasses.  See the
-     :term:`parameter` glossary entry for details.  Also see the
+     with a keyword when :meth:`!__init__` is called. See the :term:`parameter`
+     glossary entry for details.  Also see the
      :const:`KW_ONLY` section.
 
+     Keyword-only fields are not included in :attr:`!__match_args__`.
+
     .. versionadded:: 3.10
 
    - *slots*: If true (the default is ``False``), :attr:`~object.__slots__` 
attribute
@@ -306,6 +307,8 @@ Module contents
      This is used when the generated :meth:`~object.__init__` method's
      parameters are computed.
 
+     Keyword-only fields are also not included in :attr:`!__match_args__`.
+
     .. versionadded:: 3.10
 
    If the default value of a field is specified by a call to

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to