(self, struct, values=None)
:param struct:      A SimStruct instance describing the type of this struct
        :param values:      A mapping from struct fields to values
:param struct:      A SimStruct instance describing the type of this struct
        :param values:      A mapping from struct fields to values
: param struct : A SimStruct instance describing the type of this struct : param values : A mapping from struct fields to values
def __init__(self, struct, values=None):
        """
        :param struct:      A SimStruct instance describing the type of this struct
        :param values:      A mapping from struct fields to values
        """
        self._struct = struct
        # since the keys are specified, also support specifying the values as just a list
        if values is not None and hasattr(values, '__iter__') and not hasattr(values, 'items'):
            values = dict(zip(struct.fields.keys(), values))
        self._values = defaultdict(lambda: None, values or ())
def __init__ ( self , struct , values = None ) : self . _struct = struct # since the keys are specified, also support specifying the values as just a list if values is not None and hasattr ( values , '__iter__' ) and not hasattr ( values , 'items' ) : values = dict ( zip ( struct . fields . keys ( ) , values ) ) self . _values = defaultdict ( lambda : None , values or ( ) )