def get_attribute(self,attribute_name): try: return self.data[attribute_name] except (KeyError,TypeError): print self.data.__class__ exit()