Skip to content

docs: add narrative docs for BoundObject#4703

Merged
davidhewitt merged 12 commits into
PyO3:mainfrom
ngoldbaum:document-boundobject
Nov 15, 2024
Merged

docs: add narrative docs for BoundObject#4703
davidhewitt merged 12 commits into
PyO3:mainfrom
ngoldbaum:document-boundobject

Conversation

@ngoldbaum

Copy link
Copy Markdown
Contributor

@ngoldbaum ngoldbaum requested a review from Icxolu November 14, 2024 16:44

@Icxolu Icxolu left a comment

Copy link
Copy Markdown
Member

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.

Comment thread guide/src/types.md Outdated
Comment thread guide/src/types.md Outdated
ngoldbaum and others added 2 commits November 14, 2024 13:55
Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
@ngoldbaum

Copy link
Copy Markdown
Contributor Author

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

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

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
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