| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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 | ||
@@ -528,11 +528,14 @@ Module contents | |||
| 528 | 528 | ||
| 529 | 529 | .. data:: MISSING | |
| 530 | 530 | ||
| 531 | - A sentinel value signifying a missing default or default_factory. | ||
| 531 | + A :class:`sentinel` object signifying a missing default or *default_factory*. | ||
| 532 | + | ||
| 533 | + .. versionchanged:: 3.15 | ||
| 534 | + :const:`!MISSING` is now a :class:`sentinel` object. | ||
| 532 | 535 | ||
| 533 | 536 | .. data:: KW_ONLY | |
| 534 | 537 | ||
| 535 | - A sentinel value used as a type annotation. Any fields after a | ||
| 538 | + A :class:`sentinel` object used as a type annotation. Any fields after a | ||
| 536 | 539 | pseudo-field with the type of :const:`!KW_ONLY` are marked as | |
| 537 | 540 | keyword-only fields. Note that a pseudo-field of type | |
| 538 | 541 | :const:`!KW_ONLY` is otherwise completely ignored. This includes the | |
@@ -557,6 +560,9 @@ Module contents | |||
| 557 | 560 | ||
| 558 | 561 | .. versionadded:: 3.10 | |
| 559 | 562 | ||
| 563 | + .. versionchanged:: 3.15 | ||
| 564 | + :const:`!KW_ONLY` is now a :class:`sentinel` object. | ||
| 565 | + | ||
| 560 | 566 | .. exception:: FrozenInstanceError | |
| 561 | 567 | ||
| 562 | 568 | Raised when an implicitly defined :meth:`~object.__setattr__` or | |
| Back | FazBrowse Home | New Git URL |
0 commit comments