Ejemplo n.º 1
0
 def count(self, item):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return self._data.count(item)
Ejemplo n.º 2
0
 def index(self, *args):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return self._data.index(*args)
Ejemplo n.º 3
0
 def __reversed__(self):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return reversed(self._data)
Ejemplo n.º 4
0
 def __iter__(self):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return iter(self._data)
Ejemplo n.º 5
0
 def __contains__(self, item):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return item in self._data
Ejemplo n.º 6
0
 def __getitem__(self, idx):
     if self._data is None:
         raise InterfaceError("Trying to access data, when there's no data")
     return self._data.__getitem__(idx)