]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-153630: Add `str.remove{prefix,suffix}()` to the `str` method summary ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 Jul 2026 18:15:24 +0000 (20:15 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2026 18:15:24 +0000 (18:15 +0000)
(cherry picked from commit b4662e8e3b60a264486130a171047c7381f993f0)

Co-authored-by: darida12321 <73121369+darida12321@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Doc/library/stdtypes.rst

index 92c89bfc46af2e5222ca5760e230e8f81139e2f5..5a87ddb1d50156a2fc2ca8e727908037b99280b6 100644 (file)
@@ -1720,7 +1720,11 @@ category.
 |                          |  :meth:`str.strip`                        |  :meth:`bytes.strip`                              |
 |                          +--------------------+----------------------+----------------------+----------------------------+
 |                          | :meth:`str.lstrip` | :meth:`str.rstrip`   | :meth:`bytes.lstrip` | :meth:`bytes.rstrip`       |
-+--------------------------+--------------------+----------------------+----------------------+----------------------------+
+|                          +--------------------+----------------------+----------------------+----------------------------+
+|                          |  :meth:`str.removeprefix`                 |  :meth:`bytes.removeprefix`                       |
+|                          +-------------------------------------------+---------------------------------------------------+
+|                          |  :meth:`str.removesuffix`                 |  :meth:`bytes.removesuffix`                       |
++--------------------------+-------------------------------------------+---------------------------------------------------+
 | Translation and Encoding |  :meth:`str.translate`                    |  :meth:`bytes.translate`                          |
 |                          +-------------------------------------------+---------------------------------------------------+
 |                          |  :meth:`str.maketrans`                    |  :meth:`bytes.maketrans`                          |