google / google/styleguide

Python: Clarify if order of docstring sections is fixed

Open
#847 6 comments 4 reactions 0 assignees View on GitHub
lang:python
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

The python style guide mentions the docstring sections `Args`, `Returns/Yields` and `Raises` but does not clearly specify whether their order is enforced.

All examples show
```
Args: ...

Returns: ...

Raises: ...
```

Should this be taken as the only acceptable order? Or would e.g. `Raises:` before `Returns:` be allowed?

Question arose in https://github.com/danymat/neogen/pull/194

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.