def __getitem__(self, key): if key == 'id': return long(self) self.__allocate() return self._record.get(key, None)