Skip to content

generics #2097

@hiaselhans

Description

@hiaselhans

From looking through some older issues and by trying i found that generics and custom traits are not supported by pyo3.

Is that something that is on the roadmap?
or is it an "impossible" issue?
I am used to using pybind11's interface which allows for py::class_ being defined in (templated) functions, making it easy to bind existing libraries. I think there is no counterpart in pyo3 and probably this is impossible too?

As one can use multiple-pymethods feature, i guess the best way to get close to generics would be to implement a macro to create several impl's at once and specialization after that. would that be possible?

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