Skip to content

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

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions