Example #1
0
 def iteritems(self):
     if isinstance(self._items, dict):
         for key, value in iteritems(self._items):
             yield key, value
     else:
         for i, item in enumerate(self._items):
             yield i, item
Example #2
0
 def iteritems(self):
     if isinstance(self._items, dict):
         for key, value in iteritems(self._items):
             yield key, value
     else:
         for i, item in enumerate(self._items):
             yield i, item
Example #3
0
 def items(self):
     if isinstance(self._items, dict):
         return list(iteritems(self._items))
     else:
         return enumerate(self._items)
Example #4
0
 def __init__(self, **attrs):
     for key, value in iteritems(attrs):
         setattr(self, key, value)
Example #5
0
 def items(self):
     if isinstance(self._items, dict):
         return list(iteritems(self._items))
     else:
         return enumerate(self._items)
Example #6
0
 def __init__(self, **attrs):
     for key, value in iteritems(attrs):
         setattr(self, key, value)