-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
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
base: main
Are you sure you want to change the base?
Conversation
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.
str.capitalize for #106318str.capitalize
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.
str.capitalizestr.capitalize()
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/library/stdtypes.rst
Outdated
| | | :meth:`str.casefold` | | | ||
| | +-------------------------------------------+---------------------------------------------------+ | ||
| | | :meth:`str.capitalize` | :meth:`bytes.capitalize` | | ||
| | | :meth:`str.` | :meth:`bytes.capitalize` | |
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.
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.
|
Preview build failed because of the table issue. |
|
You need to update the branch to fix the CI. |
Done. |
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