From ba933083a4df1123c46e801abc7a8f10bb33ab59 Mon Sep 17 00:00:00 2001 From: Yzi-Li <1538321957@qq.com> Date: Wed, 28 May 2025 19:46:44 +0800 Subject: [PATCH 1/2] detail del[i:j] in mutable sequence types --- Doc/library/stdtypes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index f0b4b09ff10dce..170e93da90918e 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1220,7 +1220,8 @@ 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] | | +| | (same as ``s[i:j] = []``) | | +------------------------------+--------------------------------+---------------------+ | ``s[i:j:k] = t`` | the elements of ``s[i:j:k]`` | \(1) | | | are replaced by those of *t* | | From 9b33ac6b3308bfe97eae4a9419b0e1d3930eac56 Mon Sep 17 00:00:00 2001 From: Yzi-Li <1538321957@qq.com> Date: Thu, 29 May 2025 18:57:17 +0800 Subject: [PATCH 2/2] add backticks --- Doc/library/stdtypes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 170e93da90918e..ac670b1d8952fb 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1220,7 +1220,8 @@ accepts integers that meet the value restriction ``0 <= x <= 255``). | | is replaced by the contents of | | | | the iterable *t* | | +------------------------------+--------------------------------+---------------------+ -| ``del s[i:j]`` | removes the elements of 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) |