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