Change _MISSING to MISSING and make it part of the public API.

This commit is contained in:
Eric V. Smith 2017-12-26 10:11:44 -05:00
parent bcd9c94ddf
commit f7316723e9
1 changed files with 4 additions and 5 deletions

View File

@ -257,13 +257,12 @@ per-field information. To satisfy this need for additional
information, you can replace the default field value with a call to
the provided ``field()`` function. The signature of ``field()`` is::
def field(*, default=_MISSING, default_factory=_MISSING, repr=True,
def field(*, default=MISSING, default_factory=MISSING, repr=True,
hash=None, init=True, compare=True, metadata=None)
The ``_MISSING`` value is a sentinel object used to detect if the
``default`` and ``default_factory`` parameters are provided. Users
should never use ``_MISSING`` or depend on its value. This sentinel
is used because ``None`` is a valid value for ``default``.
The ``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``.
The parameters to ``field()`` are: