Skip to content

Commit 857fedb

Browse files
committed
update sentinel docs
1 parent d3c3679 commit 857fedb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

doc/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,12 +1075,12 @@ Capsule objects
10751075
Sentinel objects
10761076
~~~~~~~~~~~~~~~~
10771077

1078-
.. class:: sentinel(name, /)
1078+
.. class:: sentinel(name, /, *, repr=None)
10791079

10801080
A type used to define sentinel values. The *name* argument should be the
10811081
name of the variable to which the return value shall be assigned.
10821082

1083-
Assigning attributes to a sentinel is deprecated.
1083+
Assigning attributes to a sentinel is deprecated (except for __module__).
10841084

10851085
Example::
10861086

@@ -1106,7 +1106,7 @@ Sentinel objects
11061106
Now supports pickle and will be reduced as a singleton.
11071107
Renamed from `Sentinel` to `sentinel`, `Sentinel` is deprecated.
11081108
Automatic `repr` string no longer has angle brackets.
1109-
`repr` parameter was deprecated.
1109+
`repr` as a positional argument is deprecated.
11101110
`name` as a keyword is deprecated.
11111111
Subclassing and attribute assignment are deprecated.
11121112

0 commit comments

Comments
 (0)