Skip to content

Commit

Permalink
Improve the repr() of _marker (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored May 22, 2023
1 parent 9648c6f commit 88be907
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@
# The functions below are modified copies of typing internal helpers.
# They are needed by _ProtocolMeta and they provide support for PEP 646.

_marker = object()

class _Sentinel:
def __repr__(self):
return "<sentinel>"


_marker = _Sentinel()


def _check_generic(cls, parameters, elen=_marker):
Expand Down

0 comments on commit 88be907

Please sign in to comment.