diff options
-rw-r--r-- | build-aux/measurestack/analyze.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build-aux/measurestack/analyze.py b/build-aux/measurestack/analyze.py index 67edd5d..45ac876 100644 --- a/build-aux/measurestack/analyze.py +++ b/build-aux/measurestack/analyze.py @@ -56,9 +56,11 @@ class BaseName: class QName: _content: str + _base: BaseName | None def __init__(self, content: str) -> None: self._content = content + self._base = None def __str__(self) -> str: return self._content @@ -82,7 +84,9 @@ class QName: return hash(self._content) def base(self) -> BaseName: - return BaseName(self._content.rsplit(":", 1)[-1].split(".", 1)[0]) + if self._base is None: + self._base = BaseName(self._content.rsplit(":", 1)[-1].split(".", 1)[0]) + return self._base UsageKind: typing.TypeAlias = typing.Literal["static", "dynamic", "dynamic,bounded"] |