]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[doc] Reword sentinel object summary in dataclasses (GH-27792)
authorVille Korhonen <ville@xd.fi>
Thu, 2 Sep 2021 16:03:22 +0000 (16:03 +0000)
committerGitHub <noreply@github.com>
Thu, 2 Sep 2021 16:03:22 +0000 (18:03 +0200)
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@langa.pl>
Doc/library/dataclasses.rst

index de7dfae15ebd8e368681a59c00e123fe0c5d0b20..a7144094c6849306acdefba9a7064d0e56b9dac6 100644 (file)
@@ -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: