Next / Previous / Contents / TCC Help System / NM Tech homepage

26.3.10. __delitem__(): Delete one item of a sequence

This method defines the behavior of a del statement of this form:

del s[i]

Such a statement can be used either on objects that act like sequences, where i specifies the position of the element to be deleted, or mapping objects (that is, dictionary-like objects), where i is the key of the key-value pair to be deleted.

The calling sequence is:

    def __delitem__(self, i):