Skip to content

DOC: use different 'sections' in the docstring examples? #20039

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

Closed
jorisvandenbossche opened this issue Mar 7, 2018 · 3 comments
Closed

DOC: use different 'sections' in the docstring examples? #20039

jorisvandenbossche opened this issue Mar 7, 2018 · 3 comments
Labels
Milestone

Comments

@jorisvandenbossche
Copy link
Member

For docstrings that have quite some examples, it might be useful to provide some more structure in there.
The numpydoc parsing does not really allow actual sections, but by using for example a bold font, you can create a bit the 'sense' of subsections.

Is this something we would want to encourage in the docstring guide?

Example of the current examples section of to_datetime:

screenshot from 2018-03-07 17-03-47

And one with 'subsections' (just for the idea, not necessarily perfect titles :)):

screenshot from 2018-03-07 17-02-54

cc @datapythonista @jreback @TomAugspurger

@TomAugspurger
Copy link
Contributor

👍

@gfyoung gfyoung added the Docs label Mar 8, 2018
@gfyoung
Copy link
Member

gfyoung commented Mar 8, 2018

+1 from me as well. We are by no means strictly wed to the numpy-doc standards.

@jorisvandenbossche
Copy link
Member Author

Closing this as @datapythonista included it in the docstring guide (#19704)

@jorisvandenbossche jorisvandenbossche added this to the 0.23.0 milestone Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants