Skip to content

Align functools.reduce() docstring with PEP-257 - #126045

Merged
erlend-aasland merged 5 commits into
python:mainfrom
skirpichev:reduce-docstring
Oct 29, 2024
Merged

Align functools.reduce() docstring with PEP-257#126045
erlend-aasland merged 5 commits into
python:mainfrom
skirpichev:reduce-docstring

Conversation

@skirpichev

Copy link
Copy Markdown
Member

PEP 257 says that "Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description." This is also a requirement from the Argument Clinic.

PEP 257 says that "Multi-line docstrings consist of a summary line just
like a one-line docstring, followed by a blank line, followed by a more
elaborate description." This is also a requirement from the Argument
Clinic.
@skirpichev

Copy link
Copy Markdown
MemberAuthor

docstring changes from #125999

@erlend-aaslanderlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this a separate change, Sergey.

Comment threadLib/functools.py Outdated
Comment threadModules/_functoolsmodule.c Outdated
@erlend-aaslanderlend-aasland changed the title Improve functools.reduce() docstringAlign functools.reduce() docstring with PEP-257Oct 27, 2024
@erlend-aaslanderlend-aasland added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 27, 2024

@ZeroIntensityZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces around operators :)

Comment threadModules/_functoolsmodule.c
Comment threadLib/functools.py
@erlend-aasland

Copy link
Copy Markdown
Contributor

Spaces around operators :)

Actually in this case, I think we should keep the exiting formatting. Note that spaces around operators is no strict PEP-8 requirement; you may omit them for readability.

@ZeroIntensity

Copy link
Copy Markdown
Member

Note that spaces around operators is no strict PEP-8 requirement

I could have sworn it was. TIL!

@rhettinger
rhettinger removed their request for review October 28, 2024 01:45
skirpichevand others added 2 commits October 28, 2024 07:26
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Comment threadLib/functools.py Outdated
Comment threadLib/functools.py Outdated
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Comment threadModules/_functoolsmodule.c Outdated
@erlend-aasland
erlend-aasland enabled auto-merge (squash) October 29, 2024 07:44
@erlend-aasland
erlend-aasland merged commit 9b14083 into python:mainOct 29, 2024
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
(cherry picked from commit 9b14083)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
(cherry picked from commit 9b14083)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@bedevere-app

Copy link
Copy Markdown

GH-126113 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Oct 29, 2024
@bedevere-app

Copy link
Copy Markdown

GH-126114 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Oct 29, 2024
@skirpichev
skirpichev deleted the reduce-docstring branch October 29, 2024 08:11
erlend-aasland pushed a commit that referenced this pull request Oct 29, 2024
…126113)
Yak-shave in preparation for Argument Clinic adaption in gh-125999.
(cherry picked from commit 9b14083)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
erlend-aasland pushed a commit that referenced this pull request Oct 29, 2024
…126114)
Yak-shave in preparation for Argument Clinic adaption in gh-125999.
(cherry picked from commit 9b14083)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@skirpichev@erlend-aasland@ZeroIntensity@willingc