Skip to content

Python generator implementation #665

@feribg

Description

@feribg

I just finished work on a pure python stub generator. Right now it's somewhat crude and quality of generated code can be improved upon but it's more or less fully functional. Wondering if you're interested in a PR. It's based on the Csharp generator, so it follows the single stub with multiple methods wrap_encode, wrap_decode instead of 2 classes as per the reference Java impl. It also has a couple of neat things like full type hints and usage of https://docs.python.org/3/c-api/buffer.html#bufferobjects , however they're somewhat muted because python has to cast most memory objects to int or str anyways, so heavy on allocations, a Cython impl should be trivial based on the current code though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions