GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-106318: Add examples to str method entries by adorilson · Pull Request #105670 · python/cpython

Conversation

@adorilson

@adorilson adorilson commented Jun 11, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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/

  • Issue: Add examples to docs for str methods #106318

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

arhadthedev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
adorilson added 30 commits June 11, 2023 19:43
@adorilson
[Doc] Added snippet code to str.join method
5508700
@adorilson
[Doc] Added snippet code to str.ljust method
e388d45
@adorilson
[Doc] Added snippet code to str.rjust method
d8407ba
@adorilson
[Doc] Added 'See also' in str.lstrip and str.rstrip methods from one …
08b88ef
…to the another
@adorilson
[Doc] Added snippet code to str.maketrans method
52e3a6b
@adorilson
[Doc] Added snippet code to str.translate method
dee059c
@adorilson
[Doc] Added snippet code to str.partition method
1671497
@adorilson
[Doc] Added snippet code to str.replace method
c832623
@adorilson
[Doc] Added snippet code to str.rfind method
0be8170
@adorilson
[Doc] Added snippet code to str.rindex method
ff65bd2
@adorilson
[Doc] Added snippet code to str.rpartition method
322c88c
@adorilson
[DOC] minor change
3a473df
@adorilson
[Doc] Added snippet code to str.rsplit method
b653693
@adorilson
[Doc] Added snippet code to str.startswith method
1b412cb
@adorilson
[Doc] Added snippet code to str.swapcase method
fb56441
@adorilson
[Doc] Added snippet code to str.upper method
04a5212
@adorilson
[DOC] Added snipped code in str.capitalize
8771775
@adorilson
[DOC] Add snippet code in str.casefold and str.lower methods
f2e224c
@adorilson
[DOC] Added snippet code in str.center method
1d39f92
@adorilson
[DOC] Added snippet code in str.count method
b3a70b6
@adorilson
[DOC] fix typo
37477f8
@adorilson
[DOC] Added snippet code in str.encode method
f9a7293
@adorilson
[DOC] Added snippet code to str.endswith method
2e54cb0
@adorilson
[DOC] Added snippet code with \n to str.expandtabs method
96d9bf6
@adorilson
[DOC] Added snippet code to str.index method
d1dc7e0
@adorilson
[DOC] Added snippet code to str.isalnum method
8661d8e
@adorilson
[DOC] Added snippet code in str.isalpha method
9e1f289
@adorilson
[DOC] Added snippet code in str.isascii method
9e361d8
@adorilson
[DOC] Added snippet code to str.isdecimal method
09a463a
@adorilson
[Doc] Added snippet code to str.isdigit method
641de5c
adorilson and others added 5 commits July 3, 2023 10:08
@adorilson
Merge branch 'main' into str_methods_2
7642f31
@adorilson @hauntsaninja
Update Doc/library/stdtypes.rst
de11c93
Co-authored-by: Shantanu <[email protected]>
@adorilson
[DOC] Added some 'see also' to str methods
1695b93
@adorilson
[DOC] Moved 'For example' to the end of the previous paragraph
ad6b56b
@adorilson
[DOC] Putting a space after # in comments on str methods
e4e1405
@adorilson

adorilson commented Jul 3, 2023

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jul 3, 2023
@bedevere-bot

bedevere-bot commented Jul 3, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from terryjreedy July 3, 2023 10:46
adorilson and others added 3 commits July 3, 2023 11:54
@adorilson
[DOC] Fixed inconsistent literal block quoting
2dfa3f2
@hauntsaninja
fix other comments
27cc327
@adorilson
Merge branch 'main' into str_methods_2
13c01d7
@AA-Turner
AA-Turner self-requested a review September 21, 2023 04:07
@adorilson adorilson mentioned this pull request Nov 4, 2023
gh-106318: Add examples for the str methods in collapsible sections #111743
Closed
@ezio-melotti
ezio-melotti self-requested a review February 13, 2024 00:42
@adorilson
adorilson requested a review from hauntsaninja March 10, 2024 20:00
@blaisep blaisep mentioned this pull request May 22, 2024
gh-106318: Add string method examples #119445
Closed
@willingc willingc added awaiting changes and removed awaiting change review labels Nov 1, 2024
@blaisep blaisep mentioned this pull request May 19, 2025
gh-106318: Add an example for str.capitalize() #134272
Merged
blaisep added a commit to blaisep/cpython that referenced this pull request May 22, 2025
@blaisep
Add example for str.endswith()
409a9a0
WIP to fix python#106318 using the contributions from python#105670
This was referenced May 22, 2025
gh-106318: Add example for str.endswith() encukou/cpython#33
Closed
gh-106318: Add example for str.endswith() #134523
Merged
blaisep added a commit to blaisep/cpython that referenced this pull request May 22, 2025
@blaisep
Add example for str.expandtabs()
d133f26
WIP to fix python#106318 using the contributions from python#105670
@blaisep blaisep mentioned this pull request May 22, 2025
gh-106318: Add example for str.expandtabs() #134525
Merged
blaisep added a commit to blaisep/cpython that referenced this pull request May 22, 2025
@blaisep
pythongh-108316: Add example for str.endswith()
adb278d
WIP to fix python#106318 using the contributions from python#105670
@blaisep blaisep mentioned this pull request May 22, 2025
gh-106318: Add example for str.find() #134529
Merged
@StanFromIreland

StanFromIreland commented Jan 10, 2026

Copy link
Copy Markdown
Member

I will close this PR as it has been split into many smaller ones and quite a few have already been merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland StanFromIreland closed this Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@terryjreedy terryjreedy Awaiting requested review from terryjreedy
@AA-Turner AA-Turner Awaiting requested review from AA-Turner
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti
@hauntsaninja hauntsaninja Awaiting requested review from hauntsaninja

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting changes docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@adorilson @bedevere-bot @StanFromIreland @hauntsaninja @terryjreedy @willingc
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.