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-67748: DOC:Add summary table for str methods in stdtypes.rst by csabella · Pull Request #1709 · python/cpython

gh-67748: DOC:Add summary table for str methods in stdtypes.rst #1709

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.

Sign up for GitHub

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

Merged
encukou merged 9 commits into python:main from csabella:bpo23560
Jan 13, 2025

Uh oh!

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

Merged

gh-67748: DOC:Add summary table for str methods in stdtypes.rst #1709

Changes from 1 commit
Commits
Show all changes
9 commits
Select commit Hold shift + click to select a range
937e8dd
bpo-23560: DOC:Add summary table for str methods in stdtypes.rst
csabella May 22, 2017
b3d4477
Correct use of + where there was no intersection
csabella Oct 21, 2017
7352386
Reformat to show left and right on same row
csabella Oct 21, 2017
b577580
Add other methods of string formatting
csabella Oct 21, 2017
e7ef462
Merge branch 'main' into bpo23560
ezio-melotti Aug 30, 2022
35a0649
Merge branch 'main' into bpo23560
arhadthedev Apr 25, 2023
63227f9
Merge branch 'main' into bpo23560
willingc Oct 31, 2024
25ec485
Merge in the main branch
encukou Jan 7, 2025
f1a2a6d
Fix table formatting
encukou Jan 7, 2025
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

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

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

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

Diff view
Diff view
Prev Previous commit
Next Next commit
Reformat to show left and right on same row
  • Loading branch information

Uh oh!

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

@csabella
csabella committed Oct 21, 2017
commit 7352386cb9f87b6888f733ebb286c60eebfaab32

There are no files selected for viewing

175 changes: 81 additions & 94 deletions 175 Doc/library/stdtypes.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1384,99 +1384,87 @@ The following table summarizes the text and binary sequence types methods by
category.
Comment thread Outdated

@vadmium vadmium May 27, 2017

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.

Is this paragraph necessary? It seems obvious just given the section and table headings.

Sorry, something went wrong.

Uh oh!

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

All reactions

@csabella csabella May 27, 2017

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.

Thanks, Martin. You're right. I wasn't quite sure where to place this overall and thought there would probably be suggestions, so I kept it vague. There wasn't a section that combined both text and binary sequence types before and I didn't know if people would like having str and bytes (and bytearray) types all in one table or if there should be a separate table for each one under the existing sections.

Sorry, something went wrong.

Uh oh!

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

All reactions


+--------------------------+------------------------------+------------------------------+
| Category | str methods | bytes methods |
+==========================+==============================+==============================+
| Formatting | :meth:`str.format` | |
| +------------------------------+------------------------------+
| | :meth:`str.format_map` | |
+--------------------------+------------------------------+------------------------------+
| Searching and Replacing | :meth:`str.find` | :meth:`bytes.find` |
| +------------------------------+------------------------------+
| | :meth:`str.rfind` | :meth:`bytes.rfind` |
| +------------------------------+------------------------------+
| | :meth:`str.index` | :meth:`bytes.index` |
| +------------------------------+------------------------------+
| | :meth:`str.rindex` | :meth:`bytes.rindex` |
| +------------------------------+------------------------------+
| | :meth:`str.startswith` | :meth:`bytes.startswith` |
| +------------------------------+------------------------------+
| | :meth:`str.endswith` | :meth:`bytes.endswith` |
| +------------------------------+------------------------------+
| | :meth:`str.count` | :meth:`bytes.count` |
| +------------------------------+------------------------------+
| | :meth:`str.replace` | :meth:`bytes.replace` |
+--------------------------+------------------------------+------------------------------+
| Splitting and Joining | :meth:`str.split` | :meth:`bytes.split` |
| +------------------------------+------------------------------+
| | :meth:`str.splitlines` | :meth:`bytes.splitlines` |
| +------------------------------+------------------------------+
| | :meth:`str.rsplit` | :meth:`bytes.rsplit` |
| +------------------------------+------------------------------+
| | :meth:`str.partition` | :meth:`bytes.partition` |
| +------------------------------+------------------------------+
| | :meth:`str.rpartition` | :meth:`bytes.rpartition` |
| +------------------------------+------------------------------+
| | :meth:`str.join` | :meth:`bytes.join` |
+--------------------------+------------------------------+------------------------------+
| String Classification | :meth:`str.isalpha` | :meth:`bytes.isalpha` |
| +------------------------------+------------------------------+
| | :meth:`str.isdecimal` | |
| +------------------------------+------------------------------+
| | :meth:`str.isdigit` | :meth:`bytes.isdigit` |
| +------------------------------+------------------------------+
| | :meth:`str.isnumeric` | |
| +------------------------------+------------------------------+
| | :meth:`str.isalnum` | :meth:`bytes.isalnum` |
| +------------------------------+------------------------------+
| | :meth:`str.isidentifier` | |
| +------------------------------+------------------------------+
| | :meth:`str.islower` | :meth:`bytes.islower` |
| +------------------------------+------------------------------+
| | :meth:`str.isupper` | :meth:`bytes.isupper` |
| +------------------------------+------------------------------+
| | :meth:`str.istitle` | :meth:`bytes.istitle` |
| +------------------------------+------------------------------+
| | :meth:`str.isspace` | :meth:`bytes.isspace` |
| +------------------------------+------------------------------+
| | :meth:`str.isprintable` | |
+--------------------------+------------------------------+------------------------------+
| Case Manipulation | :meth:`str.lower` | :meth:`bytes.lower` |
| +------------------------------+------------------------------+
| | :meth:`str.upper` | :meth:`bytes.upper` |
| +------------------------------+------------------------------+
| | :meth:`str.casefold` | |
| +------------------------------+------------------------------+
| | :meth:`str.capitalize` | :meth:`bytes.capitalize` |
| +------------------------------+------------------------------+
| | :meth:`str.title` | :meth:`bytes.title` |
| +------------------------------+------------------------------+
| | :meth:`str.swapcase` | :meth:`bytes.swapcase` |
+--------------------------+------------------------------+------------------------------+
| Padding and Stripping | :meth:`str.ljust` | :meth:`bytes.ljust` |
| +------------------------------+------------------------------+
| | :meth:`str.rjust` | :meth:`bytes.rjust` |
| +------------------------------+------------------------------+
| | :meth:`str.center` | :meth:`bytes.center` |
| +------------------------------+------------------------------+
| | :meth:`str.zfill` | :meth:`bytes.zfill` |
| +------------------------------+------------------------------+
| | :meth:`str.expandtabs` | :meth:`bytes.expandtabs` |
| +------------------------------+------------------------------+
| | :meth:`str.strip` | :meth:`bytes.strip` |
| +------------------------------+------------------------------+
| | :meth:`str.lstrip` | :meth:`bytes.lstrip` |
| +------------------------------+------------------------------+
| | :meth:`str.rstrip` | :meth:`bytes.rstrip` |
+--------------------------+------------------------------+------------------------------+
| Translation and Encoding | :meth:`str.translate` | :meth:`bytes.translate` |
| +------------------------------+------------------------------+
| | :meth:`str.maketrans` | :meth:`bytes.maketrans` |
| +------------------------------+------------------------------+
| | :meth:`str.encode` | |
| +------------------------------+------------------------------+
| | | :meth:`bytes.decode` |
+--------------------------+------------------------------+------------------------------+
+--------------------------+----------------------------------------+---------------------------------------------+
| Category | :class:`str` methods |:class:`bytes` and :class:`bytearray` methods|
+==========================+========================================+=============================================+
| Formatting | :meth:`str.format` | |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.format_map` | |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| Searching and Replacing | :meth:`str.find` | :meth:`str.rfind` | :meth:`bytes.find` | :meth:`bytes.rfind` |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.index` | :meth:`str.rindex` | :meth:`bytes.index` | :meth:`bytes.rindex` |
| +-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.startswith` | :meth:`bytes.startswith` |
| +-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.endswith` | :meth:`bytes.endswith` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.count` | :meth:`bytes.count` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.replace` | :meth:`bytes.replace` |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| Splitting and Joining | :meth:`str.split` | :meth:`str.rsplit` | :meth:`bytes.split` | :meth:`bytes.rsplit` |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.splitlines` | :meth:`bytes.splitlines` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.partition` | :meth:`bytes.partition` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.rpartition` | :meth:`bytes.rpartition` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.join` | :meth:`bytes.join` |
+--------------------------+----------------------------------------+---------------------------------------------+
| String Classification | :meth:`str.isalpha` | :meth:`bytes.isalpha` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isdecimal` | |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isdigit` | :meth:`bytes.isdigit` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isnumeric` | |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isalnum` | :meth:`bytes.isalnum` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isidentifier` | |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.islower` | :meth:`bytes.islower` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isupper` | :meth:`bytes.isupper` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.istitle` | :meth:`bytes.istitle` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isspace` | :meth:`bytes.isspace` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.isprintable` | |
+--------------------------+----------------------------------------+---------------------------------------------+
| Case Manipulation | :meth:`str.lower` | :meth:`bytes.lower` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.upper` | :meth:`bytes.upper` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.casefold` | |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.capitalize` | :meth:`bytes.capitalize` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.title` | :meth:`bytes.title` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.swapcase` | :meth:`bytes.swapcase` |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| Padding and Stripping | :meth:`str.ljust` | :meth:`str.rjust` | :meth:`bytes.ljust` | :meth:`bytes.rjust` |
| +-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.center` | :meth:`bytes.center` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.expandtabs` | :meth:`bytes.expandtabs` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.strip` | :meth:`bytes.strip` |
| +-------------------+--------------------+----------------------+----------------------+
| | :meth:`str.lstrip`| :meth:`str.rstrip` | :meth:`bytes.lstrip` | :meth:`bytes.rstrip` |
+--------------------------+-------------------+--------------------+----------------------+----------------------+
| Translation and Encoding | :meth:`str.translate` | :meth:`bytes.translate` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.maketrans` | :meth:`bytes.maketrans` |
| +----------------------------------------+---------------------------------------------+
| | :meth:`str.encode` | |
| +----------------------------------------+---------------------------------------------+
| | | :meth:`bytes.decode` |
+--------------------------+----------------------------------------+---------------------------------------------+

.. _textseq:

Expand Down Expand Up @@ -1566,7 +1554,6 @@ multiple fragments.
sections. In addition, see the :ref:`stringservices` section.



.. index::
pair: string; methods

Expand Down
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 01402520 — 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.