예제 #1
0
 def __getattribute__(self, name):
     try:
         attr = SimpleItem.__getattribute__(self,
                                            'data').get(name, EMPTY_MARKER)
         if attr is not EMPTY_MARKER:
             return attr
     except AttributeError, e:
         pass
예제 #2
0
 def __getattribute__(self, name):
     try:
         attr = SimpleItem.__getattribute__(self, 'data').get(name,
                                                              EMPTY_MARKER)
         if attr is not EMPTY_MARKER:
             return attr
     except AttributeError, e:
         pass
예제 #3
0
class Record(SimpleItem):
    implements(IRecord)

    def __init__(self, **kw):
        self.id = uuid.uuid4().hex
        self.intid = None
        self.data = OOBTree()
        for key in kw.keys():
            self.data[key] = kw[key]
        self._p_changed = True

    def __getattribute__(self, name):
        try:
            attr = SimpleItem.__getattribute__(self,
                                               'data').get(name, EMPTY_MARKER)
            if attr is not EMPTY_MARKER:
                return attr
        except AttributeError, e:
            pass
        return SimpleItem.__getattribute__(self, name)