]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (#134834)
authorYongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Sun, 13 Jul 2025 05:56:31 +0000 (13:56 +0800)
committerGitHub <noreply@github.com>
Sun, 13 Jul 2025 05:56:31 +0000 (11:26 +0530)
Doc/library/stdtypes.rst

index 394c302fd354b9611d8df6a33586a0e54c9053db..8e688f03eb3a874115099ddaac55f5c47198f70e 100644 (file)
@@ -1223,7 +1223,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*   |                     |