Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pymbolic/imperative/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class Statement:
executed."""

def __post_init__(self):
object.__setattr__(self, "id", intern(self.id))
if isinstance(self.id, str):
object.__setattr__(self, "id", intern(self.id))

def get_written_variables(self) -> Set[str]:
"""Returns a :class:`frozenset` of variables being written by this
Expand Down Expand Up @@ -219,6 +220,7 @@ def __str__(self):

# {{{ conditional assignment

@dataclass(frozen=True)
class ConditionalAssignment(ConditionalStatement, Assignment):
@override
def map_expressions(self,
Expand All @@ -234,6 +236,7 @@ def map_expressions(self,

# {{{ nop

@dataclass(frozen=True)
class Nop(Statement):
def __str__(self):
return "nop"
Expand Down
Loading