Skip to content

Commit 452ead4

Browse files
committed
repr
1 parent 35b6083 commit 452ead4

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/_collections_abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def __setitem__(self, key, value):
925925
def __delitem__(self, key):
926926
raise KeyError
927927

928-
__marker = sentinel("__marker")
928+
__marker = sentinel("__marker", repr="<marker>")
929929

930930
def pop(self, key, default=__marker):
931931
'''D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

Lib/_pydatetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ class timezone(tzinfo):
24472447
__slots__ = '_offset', '_name'
24482448

24492449
# Sentinel value to disallow None
2450-
_Omitted = sentinel("_Omitted")
2450+
_Omitted = sentinel("timezone._Omitted", repr="<omitted>")
24512451
def __new__(cls, offset, name=_Omitted):
24522452
if not isinstance(offset, timedelta):
24532453
raise TypeError("offset must be a timedelta")

Lib/functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ def register(self):
11371137
### cached_property() - property result cached as instance attribute
11381138
################################################################################
11391139

1140-
_NOT_FOUND = sentinel("_NOT_FOUND")
1140+
_NOT_FOUND = sentinel("_NOT_FOUND", repr="<not found>")
11411141

11421142
class cached_property:
11431143
def __init__(self, func):

Lib/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ def trace(context=1):
16941694

16951695
# ------------------------------------------------ static version of getattr
16961696

1697-
_sentinel = sentinel("_sentinel")
1697+
_sentinel = sentinel("_sentinel", repr="<sentinel>")
16981698
_static_getmro = type.__dict__['__mro__'].__get__
16991699
_get_dunder_dict_of_class = type.__dict__["__dict__"].__get__
17001700

Lib/sched.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
Event.kwargs.__doc__ = ('''kwargs is a dictionary holding the keyword
4747
arguments for the action.''')
4848

49-
_sentinel = sentinel("_sentinel")
49+
_sentinel = sentinel("_sentinel", repr="<sentinel>")
5050

5151
class scheduler:
5252

0 commit comments

Comments
 (0)