Exemple #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
Exemple #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
Exemple #3
0
 def items(self):
     if isinstance(self._items, dict):
         return list(iteritems(self._items))
     else:
         return enumerate(self._items)
Exemple #4
0
 def __init__(self, **attrs):
     for key, value in iteritems(attrs):
         setattr(self, key, value)
Exemple #5
0
 def items(self):
     if isinstance(self._items, dict):
         return list(iteritems(self._items))
     else:
         return enumerate(self._items)
Exemple #6
0
 def __init__(self, **attrs):
     for key, value in iteritems(attrs):
         setattr(self, key, value)