Skip to content

Conversation

@blaisep
Copy link
Contributor

@blaisepblaisep 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/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-appbedevere-appbot added docs Documentation in the Doc dir skip news awaiting review labels May 19, 2025
@blaisepblaisep changed the title Add an example for str.capitalize for #106318gh-106318: Add an example for str.capitalizeMay 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.
@picnixzpicnixz changed the title gh-106318: Add an example for str.capitalizegh-106318: Add an example for str.capitalize()May 23, 2025
||:meth:`str.casefold` ||
|+-------------------------------------------+---------------------------------------------------+
||:meth:`str.capitalize` |:meth:`bytes.capitalize` |
||:meth:`str.` |:meth:`bytes.capitalize` |

Choose a reason for hiding this comment

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

This seems accidental.

Copy link
Contributor

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.

@adorilson
Copy link
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?

@StanFromIreland
Copy link
Member

Preview build failed because of the table issue.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewdocsDocumentation in the Doc dirskip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants

@blaisep@adorilson@StanFromIreland@hugovk