Skip to content

Commit cc08d14

Browse files
committed
Note user-facing changes to sentinel
Remove redundant info about sentinels, specifics from PEP 661 do not need to be repeated.
1 parent 949eacf commit cc08d14

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

doc/index.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,9 +1076,6 @@ Sentinel objects
10761076
A type used to define sentinel values. The *name* argument should be the
10771077
name of the variable to which the return value shall be assigned.
10781078

1079-
A sentinel is bound to the module it is created within,
1080-
sentinels are not equal to similar named sentinels from other modules.
1081-
10821079
Assigning attributes to a sentinel including `__weakref__` is forbidden.
10831080

10841081
Example::
@@ -1093,17 +1090,19 @@ Sentinel objects
10931090
...
10941091
>>> func(MISSING)
10951092

1096-
Sentinels defined inside a class scope should use a :term:`qualified name`.
1097-
1098-
Example::
1099-
1100-
>>> class MyClass:
1101-
... MISSING = sentinel('MyClass.MISSING')
1102-
11031093
.. versionadded:: 4.14.0
11041094

11051095
See :pep:`661`
11061096

1097+
.. versionchanged:: 4.16.0
1098+
1099+
Now supports pickle and will be reduced as a singleton.
1100+
Renamed from `Sentinel` to `sentinel`, `Sentinel` is deprecated.
1101+
Automatic `repr` string no longer has angle brackets.
1102+
`repr` parameter was deprecated.
1103+
`name` as a keyword is deprecated.
1104+
Subclasssing and attribute assignment are deprecated.
1105+
11071106

11081107
Pure aliases
11091108
~~~~~~~~~~~~

0 commit comments

Comments
 (0)