We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like to be able to write code like the following:
#[pyclass] struct Proxy { parent: Py<Foo>, } #[pyclass] struct Foo {} #[pymethods] impl Foo { #[getter] fn proxy(slf: PyRef<Self>) -> Proxy { Proxy { parent: slf.into(), } } }
However, this currently fails with the following error:
error: Getter function can only have one argument of type pyo3::Python --> src/lib.rs:12:20 | 12 | fn proxy(slf: PyRef<Self>) -> Proxy { | ^^^^^^^^^^^
(For completeness, this should also apply to setters, as well as support all of the other wrapper types for Python objects)
The text was updated successfully, but these errors were encountered:
Yeah, I really agree that it's bad. But since everything around __dunder__ is designed before PyRef or PyCell, it's hard to integrate them.
__dunder__
PyRef
PyCell
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I would like to be able to write code like the following:
However, this currently fails with the following error:
(For completeness, this should also apply to setters, as well as support all of the other wrapper types for Python objects)
The text was updated successfully, but these errors were encountered: