Skip to content

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

@mmacklin

Description

@mmacklin

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.

Metadata

Metadata

Labels

feature requestRequest for something to be added

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions