diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index 4fb769b..0f92630 100644 --- a/pymbolic/primitives.py +++ b/pymbolic/primitives.py @@ -622,6 +622,9 @@ def __call__(self, *args, **kwargs) -> Call | CallWithKwargs: return Call(self, args) if not TYPE_CHECKING: + # Subscript has an attribute 'index' which can't coexist with this. + # Thus we're hiding this from mypy until it goes away. + def index(self, subscript: Expression) -> Expression: """Return an expression representing ``self[subscript]``.