Skip to content
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

gh-106318: Add examples to str method entries #105670

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

Conversation

adorilson
Copy link
Contributor

@adorilson adorilson commented Jun 11, 2023

This PR improvements the str method documentation, adding snippet code in the follows methods and other minor improvements:

  • capitalize
  • casefold
  • center
  • count
  • encode
  • endswith
  • expandtabs
  • find
  • index
  • isalnum
  • isalpha
  • isascii
  • isdecimal
  • isdigit
  • isidentifier
  • islower
  • isnumeric
  • isprintable
  • isspace
  • istitle
  • join
  • ljust
  • lower
  • lstrip
  • maketrans
  • partition
  • replace
  • rindex
  • rjust
  • rpartition
  • rsplit
  • rstrip
  • startswith
  • swapcase
  • translate
  • upper

📚 Documentation preview 📚: https://cpython-previews--105670.org.readthedocs.build/

adorilson added 30 commits June 11, 2023 19:43
Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Mostly looks good, left a few minor comments

Most non-trivial contributions to CPython have an associated issue that serves as a place for higher level feedback and to track backports. I went ahead and opened one for this change in #106318

Doc/library/stdtypes.rst Outdated Show resolved Hide resolved
Doc/library/stdtypes.rst Outdated Show resolved Hide resolved
Doc/library/stdtypes.rst Outdated Show resolved Hide resolved
Doc/library/stdtypes.rst Outdated Show resolved Hide resolved
@hauntsaninja hauntsaninja changed the title [DOC] Snippet code to str methods gh-106318: Snippet code to str methods Jul 1, 2023
@terryjreedy terryjreedy changed the title gh-106318: Snippet code to str methods gh-106318: Add examples to str method entries Jul 1, 2023
Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

I agree with hauntsaninja's comments. Comment changes are required.

I also think most (all?) of the 'For example's could be moved to the end of the previous paragraph, or deleted and only the '::' put at the end of the previous paragraph instead of '.'

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@adorilson
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from terryjreedy July 3, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

5 participants