Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-106318: Add an example forstr.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1759,7 +1759,14 @@ expression support in the :mod:`re` module). | ||||||||||
..method::str.capitalize() | ||||||||||
Return a copy of the string with its first character capitalized and the | ||||||||||
rest lowercased. For example:: | ||||||||||
>>> 'PYTHON IS AMAZING'.capitalize() | ||||||||||
'Python is amazing' | ||||||||||
>>> 'LJjubljana starts With a non-english digraph'.capitalize() | ||||||||||
'Ljjubljana starts with a non-english digraph' | ||||||||||
Comment on lines +1766 to +1767 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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".) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. My initial suggestion was Njemačka[0], the word used in the bug report to fix capitalize[1]. | ||||||||||
See also:meth:`title`. | ||||||||||
..versionchanged::3.8 | ||||||||||
The first character is now put into titlecase rather than uppercase. | ||||||||||
Uh oh!
There was an error while loading.Please reload this page.