From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 27 May 2025 18:53:52 +0000 (+0200) Subject: [3.14] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) ... X-Git-Tag: v3.14.0b3~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ea41f8464454cf4e44d281b780623a106ab93de;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) (#134808) gh-134789: Document del s[i] operation for mutable sequences (GH-134804) [main] Update stdtypes.rst - Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section. - Clarified that this operation removes the item at the specified index from the sequence. - Addresses issue GH-134789. (cherry picked from commit 967f361993c9c97eb3ff3076a409b78ea32938df) Co-authored-by: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com> --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 31d71031bca1..f0b4b09ff10d 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1214,6 +1214,8 @@ accepts integers that meet the value restriction ``0 <= x <= 255``). | ``s[i] = x`` | item *i* of *s* is replaced by | | | | *x* | | +------------------------------+--------------------------------+---------------------+ +| ``del s[i]`` | removes item *i* of *s* | | ++------------------------------+--------------------------------+---------------------+ | ``s[i:j] = t`` | slice of *s* from *i* to *j* | | | | is replaced by the contents of | | | | the iterable *t* | |