collections.abc.MutableSequence - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


Help on class MutableSequence in collections.abc:

collections.abc.MutableSequence = class MutableSequence(Sequence)
 |  All the operations on a read-write sequence.
 |
 |  Concrete subclasses must provide __new__ or __init__,
 |  __getitem__, __setitem__, __delitem__, __len__, and insert().
 |
 |  Method resolution order:
 |      MutableSequence
 |      Sequence
 |      Reversible
 |      Collection
 |      Sized
 |      Iterable
 |      Container
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __delitem__(self, index)
 |
 |  __iadd__(self, values)
 |
 |  __setitem__(self, index, value)
 |
 |  append(self, value)
 |      S.append(value) -- append value to the end of the sequence
 |
 |  clear(self)
 |      S.clear() -> None -- remove all items from S
 |
 |  extend(self, values)
 |      S.extend(iterable) -- extend sequence by appending elements from the iterable
 |
 |  insert(self, index, value)
 |      S.insert(index, value) -- insert value before index
 |
 |  pop(self, index=-1)
 |      S.pop([index]) -> item -- remove and return item at index (default last).
 |      Raise IndexError if list is empty or index is out of range.
 |
 |  remove(self, value)
 |      S.remove(value) -- remove first occurrence of value.
 |      Raise ValueError if the value is not present.
 |
 |  reverse(self)
 |      S.reverse() -- reverse *IN PLACE*
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __abstractmethods__ = frozenset({'__delitem__', '__getitem__', '__len_...
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Sequence:
 |
 |  __contains__(self, value)
 |
 |  __getitem__(self, index)
 |
 |  __iter__(self)
 |
 |  __reversed__(self)
 |
 |  count(self, value)
 |      S.count(value) -> integer -- return number of occurrences of value
 |
 |  index(self, value, start=0, stop=None)
 |      S.index(value, [start, [stop]]) -> integer -- return first index of value.
 |      Raises ValueError if the value is not present.
 |
 |      Supporting start and stop arguments is optional, but
 |      recommended.
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from Reversible:
 |
 |  __subclasshook__(C) from abc.ABCMeta
 |      Abstract classes can override this to customize issubclass().
 |
 |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
 |      It should return True, False or NotImplemented.  If it returns
 |      NotImplemented, the normal algorithm is used.  Otherwise, it
 |      overrides the normal algorithm (and the outcome is cached).
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Sized:
 |
 |  __len__(self)
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from Iterable:
 |
 |  __class_getitem__ = GenericAlias(...) from abc.ABCMeta
 |      Represent a PEP 585 generic type
 |
 |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).


Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 06:22 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top