pyo3
pyo3 copied to clipboard
Implement new `decorate_with` argument for `pyclass` macro
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