FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-106318: Add an example for `str.capitalize()` by blaisep · Pull Request #134272 · python/cpython · GitHub

Repository navigation

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

Open
blaisep wants to merge 15 commits into
python:mainfrom
blaisep:106318
Open

blaisep wants to merge 15 commits into
python:mainfrom
blaisep:106318

Conversation

blaisep commented May 19, 2025 •
edited by hugovk
Loading

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 Bot added docs Documentation in the Doc dir skip news awaiting review labels May 19, 2025
github-project-automation Bot moved this to Todo in Docs PRs May 19, 2025
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 Outdated
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 Outdated
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 Outdated
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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

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?

Copy link
Copy Markdown
Member

Preview build failed because of the table issue.

Copy link
Copy Markdown
Member

You need to update the branch to fix the CI.

Copy link
Copy Markdown
Contributor

You need to update the branch to fix the CI.

Done.

Copy link
Copy Markdown

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

github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 stale Stale PR or inactive for long period of time.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL