Skip to content

Conversation

@sizmailov
Copy link
Contributor

Here is a small paragraph about docstring generation in pybind11. Also replicates @YannickJadoul 's example from #2263.

I'm not sure if misc.rst is the best place for it.

render

image

@sizmailov sizmailov force-pushed the avoid-cpp-types-in-docstrings branch from 42c8829 to b6354ba Compare August 27, 2020 19:02
@sizmailov sizmailov force-pushed the avoid-cpp-types-in-docstrings branch from a6abf2c to a22833d Compare August 27, 2020 19:03
Copy link
Collaborator

@YannickJadoul YannickJadoul left a comment

Choose a reason for hiding this comment

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

A few things I would personally phrase slightly differently (up to you to decide if you like it better or not), but looks succinct and good to me!

misc.rst seems find. I don't immediately see another place where we talk about docstrings and signature. It's right underneath the only other section about it ("Generating documentation using Sphinx"), so perfect for me!

Thanks for taking the time to create this, @sizmailov! :-)

@YannickJadoul
Copy link
Collaborator

Great, thanks! Let's see if someone else still has something to add. If not, this can go in as-is, afaic :-)

Copy link
Collaborator

@bstaletic bstaletic left a comment

Choose a reason for hiding this comment

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

@sizmailov Thanks for the PR

@sizmailov
Copy link
Contributor Author

Thanks everybody for quick and thoughtful reviews with great attention to even subtle things!

@YannickJadoul YannickJadoul merged commit 4c36fb7 into pybind:master Sep 1, 2020
@YannickJadoul
Copy link
Collaborator

More like, thanks @sizmailov for making this PR and fixing all our minor remarks ;-) Thanks a lot!

@patrislav1
Copy link

patrislav1 commented Jun 15, 2023

How to solve this if Foo and Bar are in different pybind11 modules?

EDIT: solved it, Foo just needs additional line py::module_::import("Bar");

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.

6 participants