]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (GH-13483...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 13 Jul 2025 06:03:33 +0000 (08:03 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Jul 2025 06:03:33 +0000 (06:03 +0000)
gh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (GH-134834)
(cherry picked from commit 609d5adc7cc241da8fe314a64ddd2c8a883ee8b7)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Doc/library/stdtypes.rst

index 87855970b64979e0a5763a9490ebed0c7dd1384e..63b251c6268e66ac1b8daebf3ee258c79cc36524 100644 (file)
@@ -1181,7 +1181,9 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
 |                              | is replaced by the contents of |                     |
 |                              | the iterable *t*               |                     |
 +------------------------------+--------------------------------+---------------------+
-| ``del s[i:j]``               | same as ``s[i:j] = []``        |                     |
+| ``del s[i:j]``               | removes the elements of        |                     |
+|                              | ``s[i:j]`` from the list       |                     |
+|                              | (same as ``s[i:j] = []``)      |                     |
 +------------------------------+--------------------------------+---------------------+
 | ``s[i:j:k] = t``             | the elements of ``s[i:j:k]``   | \(1)                |
 |                              | are replaced by those of *t*   |                     |