diff --git a/expiringdict/__init__.py b/expiringdict/__init__.py index 90d086b..add8223 100755 --- a/expiringdict/__init__.py +++ b/expiringdict/__init__.py @@ -85,6 +85,9 @@ def __getitem__(self, key, with_age=False): del self[key] raise KeyError(key) + def __repr__(self): + return f"{self.__class__.__name__}({self.items()})" + def __setitem__(self, key, value, set_time=None): """ Set d[key] to value. """ with self.lock: