March 2003
Intermediate to advanced
656 pages
39h 30m
English
__setitem__
__setitem__(self,key,value)
For a request to bind an item or slice of
x (typically an assignment
x
[
key
]=
value),
Python calls x
.__setitem__(
key,value
).
A container x should have __setitem__ only if x is
mutable, so that items, and possibly slices, can be added and/or
rebound.