(args, allowed_types)
Enforces that the type of the arguments is an allowed type
Enforces that the type of the arguments is an allowed type
Enforces that the type of the arguments is an allowed type
def assert_args_type_in(args, allowed_types):
    """ Enforces that the type of the arguments is an allowed type """
    for arg in args:
        t = arg.get_type()
        if (t not in allowed_types):
            raise PysmtTypeError(
                "Argument is of type %s, but one of %s was expected!\n" %
                (t, str(allowed_types)))
def assert_args_type_in ( args , allowed_types ) : for arg in args : t = arg . get_type ( ) if ( t not in allowed_types ) : raise PysmtTypeError ( "Argument is of type %s, but one of %s was expected!\n" % ( t , str ( allowed_types ) ) )