Skip to content

Commit fbdcf32

Browse files
committed
Add TableProxy.__hash__
1 parent 9c68ac3 commit fbdcf32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

daskms/table_proxy.py

+4
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def __call__(cls, *args, **kwargs):
164164
return _table_cache[key]
165165
except KeyError:
166166
instance = type.__call__(cls, *args, **kwargs)
167+
instance._hashvalue = key
167168
_table_cache[key] = instance
168169
return instance
169170

@@ -363,6 +364,9 @@ def __init__(self, factory, *args, **kwargs):
363364
def executor_key(self):
364365
return self._ex_key
365366

367+
def __hash__(self):
368+
return self._hashvalue
369+
366370
def __reduce__(self):
367371
"""Defer to _map_create_proxy to support kwarg pickling"""
368372
return (

0 commit comments

Comments
 (0)