typedargs/typeinfo.py
def instantiate_type(self, typename, base, subtypes):
        """Instantiate a complex type."""

        if base not in self.type_factories:
            raise ArgumentError("unknown complex base type specified", passed_type=typename, base_type=base)

        base_type = self.type_factories[base]

        #Make sure all of the subtypes are valid
        for sub_type in subtypes:
            try:
                self.get_type(sub_type)
            except KeyValueException as exc:
                raise ArgumentError("could not instantiate subtype for complex type", passed_type=typename, sub_type=sub_type, error=exc)

        typeobj = base_type.Build(*subtypes, type_system=self)
        self.inject_type(typename, typeobj)
def instantiate_type(self, typename, base, subtypes):
        if base not in self.type_factories:
            raise ArgumentError("unknown complex base type specified", passed_type=typename, base_type=base)

        base_type = self.type_factories[base]

        #Make sure all of the subtypes are valid
        for sub_type in subtypes:
            try:
                self.get_type(sub_type)
            except KeyValueException as exc:
                raise ArgumentError("could not instantiate subtype for complex type", passed_type=typename, sub_type=sub_type, error=exc)

        typeobj = base_type.Build(*subtypes, type_system=self)
        self.inject_type(typename, typeobj)
def instantiate_type ( self , typename , base , subtypes ) : if base not in self . type_factories : raise ArgumentError ( "unknown complex base type specified" , passed_type = typename , base_type = base ) base_type = self . type_factories [ base ] #Make sure all of the subtypes are valid for sub_type in subtypes : try : self . get_type ( sub_type ) except KeyValueException as exc : raise ArgumentError ( "could not instantiate subtype for complex type" , passed_type = typename , sub_type = sub_type , error = exc ) typeobj = base_type . Build ( * subtypes , type_system = self ) self . inject_type ( typename , typeobj )
Instantiate a complex type.
Instantiate a complex type .