Skip to content

python: state the order of docstring sections - #1073

Open
LubabaKhalid wants to merge 2 commits into
google:gh-pagesfrom
LubabaKhalid:pyguide-docstring-section-order
Open

LubabaKhalid wants to merge 2 commits into
google:gh-pagesfrom
LubabaKhalid:pyguide-docstring-section-order

Conversation

@LubabaKhalid

Copy link
Copy Markdown
Contributor

The examples always put Args: before Returns:/Yields: and Raises: last, but the text never says this order is expected. As confirmed in the issue discussion, this adds a sentence stating the order.

Fixes #847

The examples always put Args before Returns/Yields and Raises last, but
the text never says the order is expected.  State it.
@LubabaKhalid

Copy link
Copy Markdown
Contributor Author

@vapier Could you review this PR when you have a chance?

@vapier vapier added the lang:python The Python language label Nov 4, 2026
Comment thread pyguide.md Resolved
Move the order into a dedicated paragraph and note that an Examples
section, if used, comes before Args.
@LubabaKhalid

LubabaKhalid commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

@nathanielmanistaatgoogle and @vapier Could you review this PR when you have a chance?

@LubabaKhalid
LubabaKhalid requested a review from vapier November 5, 2026 10:47

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:python The Python language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Clarify if order of docstring sections is fixed

3 participants