Skip to content

Commit

Permalink
πŸ‘Œ IMPROVE: Add Dict.__ne__
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Sep 23, 2021
1 parent 7c794d3 commit 6d92333
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aiida/orm/nodes/data/dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ def __eq__(self, other):

return self is other

def __ne__(self, other):
if isinstance(other, dict):
return self.get_dict() != other.value

return self is not other

def set_dict(self, dictionary):
""" Replace the current dictionary with another one.
Expand Down

0 comments on commit 6d92333

Please sign in to comment.