- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
#18 #19 Show the need for a different output format.
For tuple:
def test() -> typing.Tuple[int, float, str]:
    passShould output something like
// No Comment
STATIC mp_obj_t test() {
    int ret_val_0;
    float ret_val_1;
    char[] ret_val_2;
    //Your code here
    mp_obj_t ret_val[] = {
        mp_obj_new_int(ret_val_0),
        mp_obj_new_float(ret_val_1),
        mp_obj_new_str(ret_val_2, strlen(ret_val_2)),
    };
    return mp_obj_new_tuple(3, ret_val);
}Or maybe have a custom type hint for fixed length strings
def string(length: int):
    class tmp:
        def __init__(self, length: int):
            self.length = length
            self.type = str
    return typing.NewType("string", tmp(length))
def test() -> typing.Tuple[int, float, string(5)]:
    passMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request