Skip to content

Commit d84be3b

Browse files
elohmeierJorjMcKie
authored andcommitted
Make IRect hashable
Signed-off-by: Enno Richter <[email protected]>
1 parent e613411 commit d84be3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13195,6 +13195,9 @@ def __eq__(self, r):
1319513195
def __getitem__(self, i):
1319613196
return (self.x0, self.y0, self.x1, self.y1)[i]
1319713197

13198+
def __hash__(self):
13199+
return hash(tuple(self))
13200+
1319813201
def __init__(self, *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None):
1319913202
self.x0, self.y0, self.x1, self.y1 = util_make_irect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1)
1320013203

0 commit comments

Comments
 (0)