Skip to content

In the Python generator, create aliases for numeric types #106

Description

@esoterra

When users are consuming generated code in Python, they are not able to tell which integer type a given int was or what size a float was. We can make this somewhat easier by introducing aliases for used numeric types that preserve that type info.

e.g.

def foo(a: int) -> int:
   ...

becomes

s32 = int
s64 = int

def foo(a: s32) -> s64:
   ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    component-modelRelated to component bindings generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions