Skip to content

Commit

Permalink
added custom __eq__
Browse files Browse the repository at this point in the history
  • Loading branch information
christophevg committed Jan 3, 2024
1 parent 9fb9e19 commit 5fa89b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bpmn_tools/future/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def __getitem__(self, name):
def __getattr__(self, name):
return self[name]

def __eq__(self, other):
return self.text == other.text and \
self.attributes == other.attributes and \
self.children == other.children

def find(self, key, value, skip=None, stack=None):
if stack is None:
stack = []
Expand Down

0 comments on commit 5fa89b7

Please sign in to comment.