8000 convert the indices to be weak ref value dictionaries (#53) · grbritz/document-api-python@00a9649 · GitHub
[go: up one dir, main page]

Skip to content

Commit 00a9649

Browse files
author
Russell Hay
authored
convert the indices to be weak ref value dictionaries (tableau#53)
1 parent c8eb27e commit 00a9649

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tableaudocumentapi/multilookup_dict.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import weakref
2+
3+
14
def _resolve_value(key, value):
25
try:
36
retval = value.get(key, None)
@@ -21,8 +24,8 @@ def __init__(self, args=None):
2124
args = {}
2225
super(MultiLookupDict, self).__init__(args)
2326
self._indexes = {
24-
'alias': {},
25-
'caption': {}
27+
'alias': weakref.WeakValueDictionary(),
28+
'caption': weakref.WeakValueDictionary()
2629
}
2730
self._populate_indexes()
2831

0 commit comments

Comments
 (0)
0