Skip to content
New issue

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

[REQUEST] Allow operator overloading of user defined wp.struct types #392

Open
mmacklin opened this issue Dec 12, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@mmacklin
Copy link
Collaborator

Description

It would be useful to be able to overload operators, i.e.: add(), sub(), mul(), for user defined @WP.struct types.

This could be accomplished by having users define @wp.func overloads for add(), mul() that accept the user type.

Context

An example where this is useful would be e.g.: complex numbers or interval arithmetic which could be implemented completely within Python using this approach.

@mmacklin mmacklin added the enhancement New feature or request label Dec 12, 2024
@christophercrouzet christophercrouzet self-assigned this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants