Create new type: map (dictionary) with all support for it

This commit is contained in:
Bartłomiej Pluta
2019-07-09 00:11:39 +02:00
parent a3dfae73f1
commit d23e7a1276
17 changed files with 150 additions and 29 deletions

View File

@@ -28,6 +28,12 @@ class Value:
return self
def __eq__(self, other):
return self.type == other.type and self.value == other.value
def __hash__(self):
return hash(self.type) ^ hash(self.value)
def __str__(self):
return f"{self.type.name}({self.value})"