len()
. Should return
the length of the object, an integer >=
0. Also, an object
whose __len__()
method returns 0 is considered to be false in a
Boolean context.
self[key]
. Note that the
special interpretation of negative keys (if the class wishes to
emulate a sequence type) is up to the __getitem__
method.
self[key]
. Same note as for
__getitem__
.
self[key]
. Same note as for
__getitem__
.