Пример #1
0
 def _items(self):
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
     done = []  # 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 x, ordereddict.__getitem__(merged[1], x)
         done.append(merged[1])
Пример #2
0
 def _items(self):
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
     done = []  # 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 x, ordereddict.__getitem__(merged[1], x)
         done.append(merged[1])
Пример #3
0
 def _keys(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield 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 x
         done.append(merged[1])
Пример #4
0
 def non_merged_items(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
Пример #5
0
 def _values(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield ordereddict.__getitem__(self, x)
Пример #6
0
 def _keys(self):
     # type: () -> Any
     for x in ordereddict.__iter__(self):
         yield x
Пример #7
0
 def non_merged_items(self):
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)
Пример #8
0
 def non_merged_items(self):
     for x in ordereddict.__iter__(self):
         yield x, ordereddict.__getitem__(self, x)