"graphbolt/src/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "833803f3da42e977ff87bcf1885f5e3b25a75bd5"
Commit 28069cf4 authored by alexeib's avatar alexeib Committed by Myle Ott
Browse files

fix issue with truncated dict

parent cfd2a3a0
...@@ -203,9 +203,9 @@ class Dictionary(object): ...@@ -203,9 +203,9 @@ class Dictionary(object):
class TruncatedDictionary(object): class TruncatedDictionary(object):
def __init__(self, wrapped_dict, length): def __init__(self, wrapped_dict, length):
self.__class__ = type(dict.__class__.__name__, self.__class__ = type(wrapped_dict.__class__.__name__,
(self.__class__, dict.__class__), {}) (self.__class__, wrapped_dict.__class__), {})
self.__dict__ = dict.__dict__ self.__dict__ = wrapped_dict.__dict__
self.wrapped_dict = wrapped_dict self.wrapped_dict = wrapped_dict
self.length = min(len(self.wrapped_dict), length) self.length = min(len(self.wrapped_dict), length)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment