GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-106318: Add an example for `str.capitalize()` by blaisep · Pull Request #134272 · python/cpython

Conversation

@blaisep

@blaisep blaisep commented May 19, 2025 •
edited by hugovk
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

  • Issue: Add examples to docs for str methods #106318

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@blaisep
Add an example for str.capitalize for python#106318
2194efe
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 added this to Docs PRs 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
@bedevere-app bedevere-app Bot mentioned this pull request May 19, 2025
Add examples to docs for str methods #106318
Open
StanFromIreland
StanFromIreland reviewed May 19, 2025
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

blaisep added 2 commits May 19, 2025 16:58
@blaisep
Replace the city name in the example.
41bc9bc
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.
@blaisep
Merge branch 'main' into 106318
3a14bcb
hugovk
hugovk reviewed May 23, 2025
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz changed the title gh-106318: Add an example for str.capitalize gh-106318: Add an example for str.capitalize() May 23, 2025
@adorilson @hugovk
pythongh-106318: Add an example for str.capitalize()
714ccd8
Co-authored-by: Hugo van Kemenade <[email protected]>
hugovk
hugovk reviewed Aug 27, 2025
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

adorilson and others added 2 commits August 27, 2025 18:24
@adorilson @hugovk
pythongh-106318: Add an example for str.capitalize()
806932b
Co-authored-by: Hugo van Kemenade <[email protected]>
@adorilson
Trying digraphs on stdtypes.rst (should be revert)
e1f29ec
See python#134272 (comment)
StanFromIreland
StanFromIreland reviewed Oct 1, 2025
View reviewed changes
Comment thread Doc/library/stdtypes.rst Outdated
| | :meth:`str.casefold` | |
| +-------------------------------------------+---------------------------------------------------+
| | :meth:`str.capitalize` | :meth:`bytes.capitalize` |
| | :meth:`str.` | :meth:`bytes.capitalize` |

@StanFromIreland StanFromIreland Oct 1, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This seems accidental.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@adorilson adorilson Oct 1, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adorilson

adorilson commented Oct 1, 2025

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented Oct 1, 2025

Copy link
Copy Markdown
Member

Preview build failed because of the table issue.

adorilson reacted with confused emoji
All reactions
  • 😕 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adorilson added 8 commits October 1, 2025 16:50
@adorilson
New attemptive with digraphs on stdtypes.rst
2fd3ca1
@adorilson
Recovering capitalize on stdtypes.rst
6b3052c
@adorilson
Update stdtypes.rst
fc20758
@adorilson
Revert "Update stdtypes.rst"
db5f95c
This reverts commit fc20758.
@adorilson
Revert "Recovering capitalize on stdtypes.rst"
496da33
This reverts commit 6b3052c.
@adorilson
Revert "New attemptive with digraphs on stdtypes.rst"
5280bca
This reverts commit 2fd3ca1.
@adorilson
Revert "Trying digraphs on stdtypes.rst (should be revert)"
7e9fff6
This reverts commit e1f29ec.
@adorilson
pythongh-106318: Add doctest role for str.capitalize() examples
5830105
@StanFromIreland

StanFromIreland commented Feb 7, 2026

Copy link
Copy Markdown
Member

You need to update the branch to fix the CI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adorilson
Merge branch 'encukou:main' into 106318
1572d00
@adorilson

adorilson commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

You need to update the branch to fix the CI.

Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 24, 2026
@encukou
Merge in the main branch
3e4a77b
@read-the-docs-community

read-the-docs-community Bot commented Nov 4, 2026

Copy link
Copy Markdown

Documentation build overview

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

  🔍 Preview build  

1 file changed
± builtins/stdtypes.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou
encukou merged commit c3e2422 into python:main Nov 4, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 4, 2026
@bedevere-app bedevere-app Bot removed the awaiting review label 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

miss-islington-app Bot commented Nov 4, 2026

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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Nov 4, 2026

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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @blaisep
@adorilson @hugovk
[3.15] gh-106318: Add an example for str.capitalize() (GH-134272) (G…
bdd3f1c
…H-161325)

(cherry picked from commit c3e2422)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
encukou pushed a commit that referenced this pull request Nov 4, 2026
@miss-islington @blaisep
@adorilson @hugovk
[3.14] gh-106318: Add an example for str.capitalize() (GH-134272) (G…
f3f0b0a
…H-161324)

(cherry picked from commit c3e2422)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk left review comments
@StanFromIreland StanFromIreland StanFromIreland left review comments
+1 more reviewer
@adorilson adorilson adorilson left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@blaisep @adorilson @StanFromIreland @encukou @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.