pyo3 icon indicating copy to clipboard operation
pyo3 copied to clipboard

Implement new `decorate_with` argument for `pyclass` macro

Open silvanocerza opened this issue 2 years ago • 0 comments

As of now it's not possible to decorate Python classes defined in Rust using a decorator defined in Python.

@davidhewitt proposed implementing a new argument for pyclass so that a struct can be defined with #[pyclass(decorate_with = "some_decorator_function")].

Originally posted by @davidhewitt in https://github.com/PyO3/pyo3/discussions/3537#discussioncomment-7350935

silvanocerza avatar Oct 22 '23 14:10 silvanocerza