We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#18 #19 Show the need for a different output format.
For tuple:
def test() -> typing.Tuple[int, float, str]: pass
Should 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)]: pass
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#18 #19 Show the need for a different output format.
For tuple:
Should output something like
Or maybe have a custom type hint for fixed length strings
The text was updated successfully, but these errors were encountered: