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):
class TruncatedDictionary(object):
def __init__(self, wrapped_dict, length):
self.__class__ = type(dict.__class__.__name__,
(self.__class__, dict.__class__), {})
self.__dict__ = dict.__dict__
self.__class__ = type(wrapped_dict.__class__.__name__,
(self.__class__, wrapped_dict.__class__), {})
self.__dict__ = wrapped_dict.__dict__
self.wrapped_dict = wrapped_dict
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