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 for str.casefold() and str.lower() methods by adorilson · Pull Request #142154 · python/cpython

Conversation

@adorilson

@adorilson adorilson commented Dec 1, 2025 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

WIP to #106318

gh-106318: Add examples for str.casefold() and str.lower() methods


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

Sorry, something went wrong.

Uh oh!

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

All reactions
@adorilson
pythongh-106318: Add examples for str.casefold() and str.lower() methods
17bf91d
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Dec 1, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Dec 1, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Dec 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 1, 2025
Add examples to docs for str methods #106318
Open
@bedevere-app bedevere-app Bot added the awaiting review label Dec 1, 2025
StanFromIreland
StanFromIreland reviewed Dec 1, 2025
View reviewed changes
Comment thread Doc/library/stdtypes.rst Outdated
lowercase letter ``'ß'`` is equivalent to ``"ss"``. Since it is already
lowercase, :meth:`lower` would do nothing to ``'ß'``; :meth:`casefold`
converts it to ``"ss"``.
converts it to ``"ss"``, as follows:

@StanFromIreland StanFromIreland Dec 1, 2025

Copy link
Copy Markdown
Member

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.

I find this is a little repetitive, if one reads the sentence the example just repeats the exact same thing.

Sorry, something went wrong.

Uh oh!

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

All reactions

@adorilson adorilson Dec 1, 2025

Copy link
Copy Markdown
Contributor Author

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.

What if we remove the sentence and put comments?

>>> 'ß'.casefold() # the German lowercase letter ``'ß'``
'ss'
>>> 'ß'.lower() # since it is already lowercase, lower does nothing
'ß'

Sorry, something went wrong.

Uh oh!

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

All reactions
@adorilson
pythongh-106318: Add more useful examples for str.casefold()
1161111
@adorilson
adorilson requested a review from StanFromIreland December 13, 2025 18:56
vstinner
vstinner reviewed Jan 6, 2026
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

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

@adorilson @vstinner
Update Doc/library/stdtypes.rst
053f77a
Co-authored-by: Victor Stinner <[email protected]>
@adorilson
adorilson requested a review from vstinner January 6, 2026 21:17
@vstinner
Merge branch 'main' into 106318.casefold_and_lower
139d470
vstinner
vstinner reviewed Jan 7, 2026
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

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

@adorilson @vstinner
Update Doc/library/stdtypes.rst
e74d883
Co-authored-by: Victor Stinner <[email protected]>
@adorilson
adorilson requested a review from vstinner January 7, 2026 11:54
vstinner
vstinner approved these changes Jan 7, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jan 7, 2026
StanFromIreland
StanFromIreland approved these changes Jan 7, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
StanFromIreland
StanFromIreland reviewed Jan 7, 2026
View reviewed changes
Comment thread Doc/library/stdtypes.rst Resolved

Uh oh!

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

@adorilson @StanFromIreland
Update Doc/library/stdtypes.rst
49a2e4d
Co-authored-by: Stan Ulbrych <[email protected]>
@vstinner vstinner added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jan 7, 2026
@vstinner
vstinner enabled auto-merge (squash) January 7, 2026 16:12
@vstinner
vstinner merged commit 51a56a3 into python:main Jan 7, 2026
32 checks passed

Uh oh!

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

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jan 7, 2026
@miss-islington-app

miss-islington-app Bot commented Jan 7, 2026

Copy link
Copy Markdown

Thanks @adorilson for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 7, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2026
@adorilson @vstinner
@StanFromIreland @miss-islington
pythongh-106318: Add examples for str.casefold() and str.lower() meth…
a870eaf
…ods (pythonGH-142154)

(cherry picked from commit 51a56a3)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 7, 2026
@adorilson @vstinner
@StanFromIreland @miss-islington
pythongh-106318: Add examples for str.casefold() and str.lower() meth…
78d1a3d
…ods (pythonGH-142154)

(cherry picked from commit 51a56a3)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
@bedevere-app

bedevere-app Bot commented Jan 7, 2026

Copy link
Copy Markdown

GH-143524 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jan 7, 2026
@bedevere-app

bedevere-app Bot commented Jan 7, 2026

Copy link
Copy Markdown

GH-143525 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jan 7, 2026
vstinner added a commit that referenced this pull request Jan 7, 2026
@miss-islington @adorilson
@vstinner @StanFromIreland
[3.14] gh-106318: Add examples for str.casefold() and str.lower() met…
76afbe2
…hods (GH-142154) (#143524)

gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154)
(cherry picked from commit 51a56a3)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
vstinner added a commit that referenced this pull request Jan 7, 2026
@miss-islington @adorilson
@vstinner @StanFromIreland
[3.13] gh-106318: Add examples for str.casefold() and str.lower() met…
1de1d3d
…hods (GH-142154) (#143525)

gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154)
(cherry picked from commit 51a56a3)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
@vstinner

vstinner commented Jan 7, 2026

Copy link
Copy Markdown
Member

Merged, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@adorilson @vstinner
@StanFromIreland @thunder-coding
pythongh-106318: Add examples for str.casefold() and str.lower() meth…
bcd347b
…ods (python#142154)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland StanFromIreland approved these changes
@vstinner vstinner vstinner approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

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.

3 participants

@adorilson @vstinner @StanFromIreland
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.