Skip to content

Commit 88be907

Browse files
authored
Improve the repr() of _marker (#174)
1 parent 9648c6f commit 88be907

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/typing_extensions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@
9595
# The functions below are modified copies of typing internal helpers.
9696
# They are needed by _ProtocolMeta and they provide support for PEP 646.
9797

98-
_marker = object()
98+
99+
class _Sentinel:
100+
def __repr__(self):
101+
return "<sentinel>"
102+
103+
104+
_marker = _Sentinel()
99105

100106

101107
def _check_generic(cls, parameters, elen=_marker):

0 commit comments

Comments
 (0)