From eba2c30317350785effc9a71ba3b52a2117f261d Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Thu, 18 Jan 2024 14:05:15 -0500 Subject: Add __hash__ function to Component class --- python/component.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/component.py') 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 -- cgit v1.3.1