Skip to content

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

Closed

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:
   ...

Activity

  1. added
    component-model
    on Nov 18, 2022
  2. added a commit that references this issue on Nov 5, 2025
    93261d0
  3. added a commit that references this issue on Nov 5, 2025
    ea51991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component-model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions