This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from python_jsonschema_objects.classbuilder import LiteralValue | |
# int and float are already implemented, and thus not shown here | |
LiteralValue.__getattr__ = lambda self, name: getattr(self._value, name) | |
LiteralValue.__add__ = lambda self, other: self._value + other | |
LiteralValue.__sub__ = lambda self, other: self._value - other | |
LiteralValue.__mul__ = lambda self, other: self._value * other | |
LiteralValue.__matmul__ = lambda self, other: self._value @ other |