Beispiel #1
0
 def items(self):
     """Flattens the data in all of the buckets into a single list."""
     # for queues with contents [(1, 2), (3, 4), (5, 6), (7, 8)]
     # zips and flattens to [1, 3, 5, 7, 2, 4, 6, 8]
     return filter(None, chain_from_iterable(
         zip_longest(*[bucket.items for bucket in self.buckets.values()])),
     )
Beispiel #2
0
 def flatten_links(self):
     return list(
         chain_from_iterable(
             _chain(
                 [[self]],
                 (link.flatten_links()
                  for link in maybe_list(self.options.get("link")) or []))))
Beispiel #3
0
 def items(self):
     """Flattens the data in all of the buckets into a single list."""
     # for queues with contents [(1, 2), (3, 4), (5, 6), (7, 8)]
     # zips and flattens to [1, 3, 5, 7, 2, 4, 6, 8]
     return filter(None, chain_from_iterable(
         zip_longest(*[bucket.items for bucket in self.buckets.values()])),
     )
Beispiel #4
0
 def items(self):
     # for queues with contents [(1, 2), (3, 4), (5, 6), (7, 8)]
     # zips and flattens to [1, 3, 5, 7, 2, 4, 6, 8]
     return filter(
         None,
         chain_from_iterable(
             izip_longest(
                 *[bucket.items for bucket in self.buckets.values()])))
Beispiel #5
0
 def flatten_links(self):
     """Gives a recursive list of dependencies (unchain if you will,
     but with links intact)."""
     return list(
         chain_from_iterable(
             _chain([[self]], (link.flatten_links() for link in maybe_list(self.options.get("link")) or []))
         )
     )
Beispiel #6
0
 def flatten_links(self):
     return list(chain_from_iterable(_chain([[self]],
             (link.flatten_links()
                 for link in maybe_list(self.options.get('link')) or []))))
Beispiel #7
0
 def items(self):
     # for queues with contents [(1, 2), (3, 4), (5, 6), (7, 8)]
     # zips and flattens to [1, 3, 5, 7, 2, 4, 6, 8]
     return filter(None, chain_from_iterable(izip_longest(*[bucket.items
                                 for bucket in self.buckets.values()])))
Beispiel #8
0
 def flatten_links(self):
     """Gives a recursive list of dependencies (unchain if you will,
     but with links intact)."""
     return list(chain_from_iterable(_chain([[self]],
             (link.flatten_links()
                 for link in maybe_list(self.options.get("link")) or []))))