Skip to content

Commit a54b989

Browse files
committed
Tweak some wording
1 parent a6255fb commit a54b989

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

peps/pep-0661.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,14 @@ also work as expected, returning ``True`` only when the object is compared
155155
with itself. Identity checks such as ``if value is MISSING:`` should usually
156156
be used rather than boolean checks such as ``if value:`` or ``if not value:``.
157157

158-
Sentinel instances are truthy by default, unlike ``None``. This parallels the
159-
default for arbitrary classes, as well as the boolean value of ``Ellipsis``.
158+
Sentinel instances are "truthy", i.e. boolean evaluation will result in
159+
``True``. This parallels the default for arbitrary classes, as well as the
160+
boolean value of ``Ellipsis``. This is unlike ``None``, which is "falsy".
160161

161162
The names of sentinels are unique within each module. When calling
162163
``Sentinel()`` in a module where a sentinel with that name was already
163164
defined, the existing sentinel with that name will be returned. Sentinels
164-
with the same name in different modules will be distinct from each other.
165+
with the same name from different modules will be distinct from each other.
165166

166167
Creating a copy of a sentinel object, such as by using ``copy.copy()`` or by
167168
pickling and unpickling, will return the same object.
@@ -174,10 +175,8 @@ not work as intended, such as perhaps when using Jython or IronPython. This
174175
parallels the designs of ``Enum`` and ``namedtuple``. For more details, see
175176
:pep:`435`.
176177

177-
The ``Sentinel`` class may not be sub-classed, to avoid overly-clever uses
178-
based on it, such as attempts to use it as a base for implementing singletons.
179-
It is considered important that the addition of Sentinel to the stdlib should
180-
add minimal complexity.
178+
The ``Sentinel`` class may not be sub-classed, to avoid the greater complexity
179+
of supporting subclassing.
181180

182181
Ordering comparisons are undefined for sentinel objects.
183182

0 commit comments

Comments
 (0)