| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c811e85 commit ac4e5d2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -262,8 +262,8 @@ Module contents | |||
| 262 | 262 | c = C() | |
| 263 | 263 | c.mylist += [1, 2, 3] | |
| 264 | 264 | ||
| 265 | - As shown above, the :const:`MISSING` value is a sentinel object used to | ||
| 266 | - detect if some parameters are provided by the user. This sentinel is | ||
| 265 | + As shown above, the :const:`MISSING` value is a :class:`sentinel` object | ||
| 266 | + used to detect if some parameters are provided by the user. This sentinel is | ||
| 267 | 267 | used because ``None`` is a valid value for some parameters with | |
| 268 | 268 | a distinct meaning. No code should directly use the :const:`MISSING` value. | |
| 269 | 269 | ||
@@ -523,11 +523,14 @@ Module contents | |||
| 523 | 523 | ||
| 524 | 524 | .. data:: MISSING | |
| 525 | 525 | ||
| 526 | - A sentinel value signifying a missing default or default_factory. | ||
| 526 | + A :class:`sentinel` object signifying a missing default or *default_factory*. | ||
| 527 | + | ||
| 528 | + .. versionchanged:: 3.15 | ||
| 529 | + :const:`!MISSING` is now a :class:`sentinel` object. | ||
| 527 | 530 | ||
| 528 | 531 | .. data:: KW_ONLY | |
| 529 | 532 | ||
| 530 | - A sentinel value used as a type annotation. Any fields after a | ||
| 533 | + A :class:`sentinel` object used as a type annotation. Any fields after a | ||
| 531 | 534 | pseudo-field with the type of :const:`!KW_ONLY` are marked as | |
| 532 | 535 | keyword-only fields. Note that a pseudo-field of type | |
| 533 | 536 | :const:`!KW_ONLY` is otherwise completely ignored. This includes the | |
@@ -552,6 +555,9 @@ Module contents | |||
| 552 | 555 | ||
| 553 | 556 | .. versionadded:: 3.10 | |
| 554 | 557 | ||
| 558 | + .. versionchanged:: 3.15 | ||
| 559 | + :const:`!KW_ONLY` is now a :class:`sentinel` object. | ||
| 560 | + | ||
| 555 | 561 | .. exception:: FrozenInstanceError | |
| 556 | 562 | ||
| 557 | 563 | Raised when an implicitly defined :meth:`~object.__setattr__` or | |
| Back | FazBrowse Home | New Git URL |
0 commit comments