public
Created

  • Download Gist
gistfile1.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
class Future (object) :
def __init__ (self, *args, **kwargs) :
super (Future, self).__init__ (*args, **kwargs)
 
def __nonzero__ (self) :
return bool (self._data ())
 
def __len__ (self) :
return len (self._data ())
 
def __setitem__ (self, key, value) :
return self._data ().__setitem__ (key, value)
def __getitem__ (self, key) :
return self._data ().__getitem__ (key)
 
def __str__ (self) :
return self._data ().__str__ ()
 
def __repr__ (self) :
return self._data ().__repr__ ()
 
def _data (self) :
pass # load data

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.