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

docstring method for Base.Docs.doc(::Py) #147

Closed
stevengj opened this issue Apr 12, 2022 · 4 comments
Closed

docstring method for Base.Docs.doc(::Py) #147

stevengj opened this issue Apr 12, 2022 · 4 comments

Comments

@stevengj
Copy link
Member

It might be nice to make the Julia help fetch the Python docstrings if available?

Something like this: https://github.com/JuliaPy/PyCall.jl/blob/2728e20162db3c90198e2828c40e675924c73528/src/PyCall.jl#L260-L268

@cjdoris
Copy link
Collaborator

cjdoris commented Apr 21, 2022

I already overloaded Docs.getdoc so help> pybuiltins.int works, for example. But I've just added an overload for Docs.doc too.

@cjdoris cjdoris closed this as completed Apr 21, 2022
@icweaver
Copy link

Yayy docstrings! 🌈

Screenshot_2022-04-21_06-38-32

@CarloLucibello
Copy link
Contributor

can we get a new release with this feature?

@cjdoris
Copy link
Collaborator

cjdoris commented May 21, 2022

I've just updated it so the docstring is rendered as a code block. It's not especially pretty, but at least it preserves the formatting of the docstring.

image

There are some breaking changes on main, so I'm not rushing into another release, but it won't be long.

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

No branches or pull requests

4 participants