#!/usr/local/bin/python2 class C: def __init__(self): self.l = [] def __setitem__(self, k, v): self.l[k] = v c = C() c[1] = 1