From f64614b8ceb8ee35bfb57d7e30efdb8dd366ca66 Mon Sep 17 00:00:00 2001 From: ichuang Date: Tue, 12 Jun 2012 13:36:33 -0400 Subject: [PATCH] fix correctmap set_dict bug - make __getitem__ call self.cmap.__getitem__ --- common/lib/capa/correctmap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/correctmap.py b/common/lib/capa/correctmap.py index ec3fed54c2..63d4fb33b2 100644 --- a/common/lib/capa/correctmap.py +++ b/common/lib/capa/correctmap.py @@ -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__()