[Python-checkins] [doc] Reword sentinel object summary in dataclasses (GH-27792)

ambv webhook-mailer at python.org
Thu Sep 2 12:03:30 EDT 2021


https://github.com/python/cpython/commit/767a17f35a581da664ac8cf5d67281da9485eebf
commit: 767a17f35a581da664ac8cf5d67281da9485eebf
branch: main
author: Ville Korhonen <ville at xd.fi>
committer: ambv <lukasz at langa.pl>
date: 2021-09-02T18:03:22+02:00
summary:

[doc] Reword sentinel object summary in dataclasses (GH-27792)

This sentinel value (`MISSING`) is also used as default value for the `kw_only` parameter introduced in Python 3.10. It's cleaner to simply omit the usage here.

Co-authored-by: Łukasz Langa <lukasz at langa.pl>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index de7dfae15ebd8..a7144094c6849 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -221,10 +221,9 @@ Module contents
      c.mylist += [1, 2, 3]
 
    As shown above, the :const:`MISSING` value is a sentinel object used to
-   detect if the ``default`` and ``default_factory`` parameters are
-   provided.  This sentinel is used because ``None`` is a valid value
-   for ``default``.  No code should directly use the :const:`MISSING`
-   value.
+   detect if some parameters are provided by the user. This sentinel is
+   used because ``None`` is a valid value for some parameters with
+   a distinct meaning.  No code should directly use the :const:`MISSING` value.
 
    The parameters to :func:`field` are:
 



More information about the Python-checkins mailing list