https://github.com/python/cpython/commit/967f361993c9c97eb3ff3076a409b78ea32938df
commit: 967f361993c9c97eb3ff3076a409b78ea32938df
branch: main
author: Rishabh Singh <[email protected]>
committer: nedbat <[email protected]>
date: 2025-05-27T14:48:04-04:00
summary:
gh-134789: Document del s[i] operation for mutable sequences (#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 #134789.
files:
M Doc/library/stdtypes.rst
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 31d71031bca12c..f0b4b09ff10dce 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* |
|
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]