예제 #1
0
 def _values(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield ordereddict.__getitem__(self, x)
     done = []  # type: List[Any]  # list of processed merge items, kept for masking
     for merged in getattr(self, merge_attrib, []):
         for x in merged[1]:
             if ordereddict.__contains__(self, x):
                 continue
             for y in done:
                 if x in y:
                     break
             else:
                 yield ordereddict.__getitem__(merged[1], x)
         done.append(merged[1])
예제 #2
0
 def _values(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield ordereddict.__getitem__(self, x)
     done = [
     ]  # type: List[Any]  # list of processed merge items, kept for masking
     for merged in getattr(self, merge_attrib, []):
         for x in merged[1]:
             if ordereddict.__contains__(self, x):
                 continue
             for y in done:
                 if x in y:
                     break
             else:
                 yield ordereddict.__getitem__(merged[1], x)
         done.append(merged[1])
예제 #3
0
 def __getitem__(self, key):
     try:
         return ordereddict.__getitem__(self, key)
     except KeyError:
         for merged in getattr(self, merge_attrib, []):
             if key in merged[1]:
                 return merged[1][key]
         raise
예제 #4
0
 def __getitem__(self, key):
     # type: (Any) -> Any
     try:
         return ordereddict.__getitem__(self, key)
     except KeyError:
         for merged in getattr(self, merge_attrib, []):
             if key in merged[1]:
                 return merged[1][key]
         raise
예제 #5
0
 def non_merged_items(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
예제 #6
0
 def _items(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
예제 #7
0
 def non_merged_items(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         if x in self._ok:
             yield x, ordereddict.__getitem__(self, x)