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

docs: add narrative docs for BoundObject #4703

Merged
merged 12 commits into from
Nov 15, 2024

Conversation

ngoldbaum
Copy link
Contributor

Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think it's a good idea to add a bit of documentation around this.

Personally I would put this closer to the documentation of IntoPyObject (in traits.md), because (at least currently) that's the only place this comes up.

I like the example and wonder whether we should extend it a bit to show a transition from a concrete version of this it, say turning an Vec<u32> to a Vec<Bound<PyInt>>, then generalize this to Vec<T> to a Vec<Bound<T::Target>> or something, with some type annotation/comments explaining the difference.

guide/src/types.md Outdated Show resolved Hide resolved
guide/src/types.md Outdated Show resolved Hide resolved
ngoldbaum and others added 2 commits November 14, 2024 13:55
Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
@ngoldbaum
Copy link
Contributor Author

Good idea! I'll look at expanding it with the concrete example, along with moving this to the docs for IntoPyObject.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks both, this looks good to me. I'll roll this up now in prep for 0.23 release.

@davidhewitt davidhewitt added this pull request to the merge queue Nov 15, 2024
Merged via the queue into PyO3:main with commit 71100db Nov 15, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants