MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / as_long

Method as_long

lean_py/z3/core.py:559–565  ·  view source on GitHub ↗

Return the integer value as a Python int.

(self)

Source from the content-addressed store, hash-verified

557 __slots__ = ()
558
559 def as_long(self) -> int:
560 """Return the integer value as a Python int."""
561 if isinstance(self._ast, IntLit):
562 return self._ast.val
563 if isinstance(self._ast, NatLit):
564 return self._ast.val
565 raise TypeError("Not an integer literal")
566
567 def as_string(self) -> str:
568 return str(self.as_long())

Callers 1

as_stringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected