collections.MutableMapping

class collections.MutableMapping[source]

A MutableMapping is a generic container for associating key/value pairs.

This class provides concrete generic implementations of all methods except for __getitem__, __setitem__, __delitem__, __iter__, and __len__.

Methods

__contains__(key)
__delitem__(key)
__eq__(other)
__format__ default object formatter
__getitem__(key)
__iter__()
__len__()
__ne__(other)
__new__((S, ...)
__reduce__ helper for pickle
__reduce_ex__ helper for pickle
__setitem__(key, value)
__sizeof__(() -> int) size of object in memory, in bytes
__subclasshook__(C)
clear(() -> None.  Remove all items from D.)
get((k[,d]) -> D[k] if k in D, ...)
items(() -> list of D’s (key, value) pairs, ...)
iteritems(() -> an iterator over the (key, ...)
iterkeys(() -> an iterator over the keys of D)
itervalues(...)
keys(() -> list of D’s keys)
pop((k[,d]) -> v, ...) If key is not found, d is returned if given, otherwise KeyError is raised.
popitem(() -> (k, v), ...) as a 2-tuple; but raise KeyError if D is empty.
setdefault((k[,d]) -> D.get(k,d), ...)
update(([E, ...) If E present and has a .keys() method, does: for k in E: D[k] = E[k]
values(() -> list of D’s values)