From 0ae46ad72c1d23d472bd052d59fc9ce1d08c6966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20PELEGRIN?= Date: Thu, 24 Nov 2022 09:55:28 +0100 Subject: [PATCH] Added simple equality operator for class Symbol --- jsondiff/symbols.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jsondiff/symbols.py b/jsondiff/symbols.py index 0730457..b4c8a96 100644 --- a/jsondiff/symbols.py +++ b/jsondiff/symbols.py @@ -9,6 +9,9 @@ def __repr__(self): def __str__(self): return "$" + self.label + def __eq__(self, other): + return self.label == other.label + missing = Symbol('missing') identical = Symbol('identical') delete = Symbol('delete')