Skip to content

Commit 767a17f

Browse files
ypcsambv
andauthored
[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@langa.pl>
1 parent f0b63d5 commit 767a17f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/library/dataclasses.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,9 @@ Module contents
221221
c.mylist += [1, 2, 3]
222222

223223
As shown above, the :const:`MISSING` value is a sentinel object used to
224-
detect if the ``default`` and ``default_factory`` parameters are
225-
provided. This sentinel is used because ``None`` is a valid value
226-
for ``default``. No code should directly use the :const:`MISSING`
227-
value.
224+
detect if some parameters are provided by the user. This sentinel is
225+
used because ``None`` is a valid value for some parameters with
226+
a distinct meaning. No code should directly use the :const:`MISSING` value.
228227

229228
The parameters to :func:`field` are:
230229

0 commit comments

Comments
 (0)