(self, seq, kwds=None)
Constructs a new attribute collector that uses the given
        vertex/edge sequence and the given dict as data sources.

        @param seq: an L{igraph.VertexSeq} or L{igraph.EdgeSeq} class
          that will be used as a data source for attributes.
        @param kwds: a Python dict that will be used to override the
          attributes collected from I{seq} if necessary.
Constructs a new attribute collector that uses the given
        vertex/edge sequence and the given dict as data sources.
Constructs a new attribute collector that uses the given vertex / edge sequence and the given dict as data sources .
def __init__(self, seq, kwds=None):
        """Constructs a new attribute collector that uses the given
        vertex/edge sequence and the given dict as data sources.

        @param seq: an L{igraph.VertexSeq} or L{igraph.EdgeSeq} class
          that will be used as a data source for attributes.
        @param kwds: a Python dict that will be used to override the
          attributes collected from I{seq} if necessary.
        """
        elt = self.__class__.Element
        self._cache = [elt() for _ in range(len(seq))]

        self.seq = seq
        self.kwds = kwds or {}

        for attr_spec in self._attributes:
            values = self._collect_attributes(attr_spec)
            attr_name = attr_spec.name
            for cache_elt, val in zip(self._cache, values):
                setattr(cache_elt, attr_name, val)
def __init__ ( self , seq , kwds = None ) : elt = self . __class__ . Element self . _cache = [ elt ( ) for _ in range ( len ( seq ) ) ] self . seq = seq self . kwds = kwds or { } for attr_spec in self . _attributes : values = self . _collect_attributes ( attr_spec ) attr_name = attr_spec . name for cache_elt , val in zip ( self . _cache , values ) : setattr ( cache_elt , attr_name , val )