Name
__delitem__
Synopsis
__delitem__(self,key
)
For a request to unbind an item or slice of
x
(typically del
x
[
key
]
),
Python will call x
.__delitem__(
key
)
. A
container x
should have __delitem__
only if x
is
mutable, so that items (and possibly slices) can be removed.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.