diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index 6ba414e5..bc8714b8 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -293,6 +293,14 @@ def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override] except StopIteration: raise KeyError(name) + def __repr__(self): + """ + Repr with classname and tuple constructor to + signal that we deviate from regular tuple behavior. + """ + return '%s(%r)' % (self.__class__.__name__, tuple(self)) + + def select(self, **params): """ Select entry points from self that match the