return the result of calling 'attr' for each of our elements
(self, attr, *args, **kwds)
| 18 | return Collection([getattr(x, attr) for x in self if hasattr(x, attr)]) |
| 19 | |
| 20 | def call(self, attr, *args, **kwds): |
| 21 | """return the result of calling 'attr' for each of our elements""" |
| 22 | attrs = self.get(attr) |
| 23 | return Collection([x(*args, **kwds) |
| 24 | for x in attrs |
| 25 | if callable(x)]) |
| 26 | |
| 27 | if __name__ == "__main__": |
| 28 | import time |
no test coverage detected