mirror of https://github.com/python/cpython.git
[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>
This commit is contained in:
parent
f0b63d5b56
commit
767a17f35a
|
@ -221,10 +221,9 @@ Module contents
|
||||||
c.mylist += [1, 2, 3]
|
c.mylist += [1, 2, 3]
|
||||||
|
|
||||||
As shown above, the :const:`MISSING` value is a sentinel object used to
|
As shown above, the :const:`MISSING` value is a sentinel object used to
|
||||||
detect if the ``default`` and ``default_factory`` parameters are
|
detect if some parameters are provided by the user. This sentinel is
|
||||||
provided. This sentinel is used because ``None`` is a valid value
|
used because ``None`` is a valid value for some parameters with
|
||||||
for ``default``. No code should directly use the :const:`MISSING`
|
a distinct meaning. No code should directly use the :const:`MISSING` value.
|
||||||
value.
|
|
||||||
|
|
||||||
The parameters to :func:`field` are:
|
The parameters to :func:`field` are:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue