Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blaisep
Copy link
Contributor

@blaisep blaisep commented May 19, 2025

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/

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
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 on lines +1766 to +1767
>>> 'LJjubljana starts With a non-english digraph'.capitalize()
'Ljjubljana starts with a non-english digraph'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> 'LJjubljana starts With a non-english digraph'.capitalize()
'Ljjubljana starts with a non-english digraph'
>>> 'LJjubljana starts With a non-English digraph'.capitalize()
'Ljjubljana starts with a non-English digraph'

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look like the word Ljubljana is written with a digraph though?

https://sl.wikipedia.org/wiki/Ljubljana

Is there a word we can use that does?

(Plus we effectively have an L and two Js in "LJjubljana".)

Copy link
Contributor

Choose a reason for hiding this comment

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

@picnixz picnixz changed the title gh-106318: Add an example for str.capitalize gh-106318: Add an example for str.capitalize() May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

4 participants