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

Document passing PyClass values as arguments #1059

Closed
davidhewitt opened this issue Jul 20, 2020 · 0 comments · Fixed by #3243
Closed

Document passing PyClass values as arguments #1059

davidhewitt opened this issue Jul 20, 2020 · 0 comments · Fixed by #3243

Comments

@davidhewitt
Copy link
Member

Just thinking it might be worth adding a table to the guide (class.md?) which talks about the different choices for taking #[pyclass] values as arguments.

Currently there's MyClass, &MyClass, &self, &mut self, PyRef<MyClass>, PyRefMut<MyClass>, and &PyCell<MyClass>.

All have moments when you might want them, but it would help users if this was documented better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant