def extracting(self, *names):
        """Asserts that val is collection, then extracts the named properties or named zero-arg methods into a list (or list of tuples if multiple names are given)."""
        if not isinstance(self.val, collections.Iterable):
            raise TypeError('val is not iterable')
        if isinstance(self.val, str_types):
            raise TypeError('val must not be string')
        if len(names) == 0:
            raise ValueError('one or more name args must be given')
        extracted = []
        for i in self.val:
            items = []
            for name in names:
                if type(i) is dict:
                    if name in i:
                        items.append(i[name])
                    else:
                        raise ValueError('item keys %s did not contain key <%s>' % (list(i.keys()), name))
                elif hasattr(i, name):
                    attr = getattr(i, name)
                    if callable(attr):
                        try:
                            items.append(attr())
                        except __HOLE__:
                            raise ValueError('val method <%s()> exists, but is not zero-arg method' % name)
                    else:
                        items.append(attr)
                else:
                    raise ValueError('val does not have property or zero-arg method <%s>' % name)
            extracted.append(tuple(items) if len(items) > 1 else items[0])
        return AssertionBuilder(extracted, self.description)

### dynamic assertions ###
dataset/ETHPy150Open ActivisionGameScience/assertpy/assertpy/assertpy.py/AssertionBuilder.extracting