Commit f64614b8 by ichuang Committed by Matthew Mongeau

fix correctmap set_dict bug - make __getitem__ call self.cmap.__getitem__

parent 3e2ef6b8
......@@ -19,12 +19,13 @@ class CorrectMap(object):
'''
def __init__(self,*args,**kwargs):
self.cmap = dict() # start with empty dict
self.__getitem__ = self.cmap.__getitem__
self.__iter__ = self.cmap.__iter__
self.items = self.cmap.items
self.keys = self.cmap.keys
self.set(*args,**kwargs)
def __getitem__(self, *args, **kwargs):
return self.cmap.__getitem(*args, **kwargs)
def __iter__(self):
return self.cmap.__iter__()
......
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