Skip to content

Commit

Permalink
feat: add __str__ for symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkrzyskow committed Nov 11, 2024
1 parent f342e9c commit 6d02807
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zenkit/daedalus_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def value(self) -> DaedalusSymbolValue:
def __repr__(self) -> str:
return f"<{self.__class__.__name__} handle={self._handle} name={self.name!r} type={self.type.name}>"

def __str__(self) -> str:
value = self.value
return value.__str__() if value is not None else self.__repr__()


class DaedalusInstruction(Structure):
_fields_: ClassVar[tuple[str, Any]] = [
Expand Down

0 comments on commit 6d02807

Please sign in to comment.