Implement __repr__

This commit is contained in:
Eric Torres 2019-04-08 22:12:33 -07:00
parent 981e7cfa58
commit 6fb3007696

View File

@ -54,6 +54,10 @@ class Hierarchy(PathLike):
except TypeError as e: except TypeError as e:
raise e raise e
def __repr__(self):
"""Return a string representation of this Hierarchy."""
return f"{self.__class__.__name__}('{self._path}')"
def __fspath__(self): def __fspath__(self):
return str(self._path) return str(self._path)