PyDocs

Nav

Python Runtime Services

object.__setitem__

builtins

method of object
  • object.__setitem__(self, key, value)
Called to implement assignment to self[key]. Same note as for __getitem__(). This should only be implemented for mappings if the objects support changes to the values for keys, or if new keys can be added, or for sequences if elements can be replaced. The same exceptions should be raised for improper key values as for the __getitem__() method.
0 Examples
No examples for builtins/object.__setitem__.
See Also
No see-alsos for builtins/object.__setitem__
0 Notes
No notes for object.__setitem__