summaryrefslogtreecommitdiff
path: root/python/component.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2024-01-18 14:05:15 -0500
committerPeter LaFosse <peter@vector35.com>2024-01-18 14:05:15 -0500
commiteba2c30317350785effc9a71ba3b52a2117f261d (patch)
tree7059ff55feac63da0d0e9e0c2534f4a3ead5eea5 /python/component.py
parentd2e0420679ad9cfc0a25ccf768cdfef7bb14c978 (diff)
Add __hash__ function to Component class
Diffstat (limited to 'python/component.py')
-rw-r--r--python/component.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/component.py b/python/component.py
index 0c772de8..3f56fe71 100644
--- a/python/component.py
+++ b/python/component.py
@@ -48,6 +48,9 @@ class Component:
def __str__(self):
return self._sprawl_component(self)
+ def __hash__(self):
+ return hash(self.guid)
+
def _sprawl_component(self, c, depth=1, out=None):
"""
Recursive quick function to print out the component's tree of items