Skip to content

gh-106318: Add an example for str.capitalize() - #134272

Merged
encukou merged 16 commits into
python:mainfrom
blaisep:106318
Nov 4, 2026
Merged

encukou merged 16 commits into
python:mainfrom
blaisep:106318

Conversation

@blaisep

@blaisep blaisep commented May 19, 2025 •

Copy link
Copy Markdown
Contributor

This is the smallest possible step toward #106318 , adding examples for the string methods. The content was contributed by @adorilson in #105670 Because #119445 is big and difficult to review, this PR will be updated as the individual examples get merged.


📚 Documentation preview 📚: https://cpython-previews--134272.org.readthedocs.build/en/134272/library/stdtypes.html#str.capitalize

This is the smallest possible step toward adding examples for the string methods.
The content was  contributed by @adorilson in python#105670
Because  python#119445 is big and difficult to review,
this PR will be updated as the individual examples get merged.
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting review labels May 19, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 19, 2025
@blaisep blaisep changed the title Add an example for str.capitalize for #106318 gh-106318: Add an example for str.capitalize May 19, 2025
Comment thread Doc/library/stdtypes.rst Resolved
blaisep added 2 commits May 19, 2025 16:58
The suggestion was to use a example where there was a bigger contrast between the uppercase in the input stream and the mixed case in the result.
Comment thread Doc/library/stdtypes.rst Resolved
@picnixz picnixz changed the title gh-106318: Add an example for str.capitalize gh-106318: Add an example for str.capitalize() May 23, 2025
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Comment thread Doc/library/stdtypes.rst Resolved
adorilson and others added 2 commits August 27, 2025 18:24
Comment thread Doc/library/stdtypes.rst Outdated
| | :meth:`str.casefold` | |
| +-------------------------------------------+---------------------------------------------------+
| | :meth:`str.capitalize` | :meth:`bytes.capitalize` |
| | :meth:`str.` | :meth:`bytes.capitalize` |

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.

This seems accidental.

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.

Sorry, it was. Anyway, this commit should be reverted.

@adorilson

Copy link
Copy Markdown
Contributor

I have I big doubt.

e1f29ec breaks doctests. I didn't mind because it was just a attempt to discover a better character, as @hugovk has suggested.

Question: will the documentation preview update anyway, or just if doctest are fine?

@StanFromIreland

Copy link
Copy Markdown
Member

Preview build failed because of the table issue.

@StanFromIreland

Copy link
Copy Markdown
Member

You need to update the branch to fix the CI.

@adorilson

Copy link
Copy Markdown
Contributor

You need to update the branch to fix the CI.

Done.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 24, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35647162 | 📁 Comparing 3e4a77b against main (0d3ab6f)

  🔍 Preview build  

1 file changed
± builtins/stdtypes.html

@encukou
encukou enabled auto-merge (squash) November 4, 2026 16:25
@encukou

encukou commented Nov 4, 2026

Copy link
Copy Markdown
Member

This is an improvement. I enabled automerge; we can iterate in future PRs if needed.

@encukou
encukou merged commit c3e2422 into python:main Nov 4, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 4, 2026
@encukou encukou added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 4, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @blaisep for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @blaisep for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 4, 2026

Copy link
Copy Markdown

GH-161324 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 4, 2026
@bedevere-app

bedevere-app Bot commented Nov 4, 2026

Copy link
Copy Markdown

GH-161325 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 4, 2026
encukou pushed a commit that referenced this pull request Nov 4, 2026
…H-161325)

(cherry picked from commit c3e2422)

Co-authored-by: Blaise Pabon <254456+blaisep@users.noreply.github.com>
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
encukou pushed a commit that referenced this pull request Nov 4, 2026
…H-161324)

(cherry picked from commit c3e2422)

Co-authored-by: Blaise Pabon <254456+blaisep@users.noreply.github.com>
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants