I am not sure how __getitem__ works with 3 parameters. I think it is supposed to have only 2. See http://docs.python.org/2/reference/datamodel.html#object.__getitem__