def __getitem__(self, i): # extend 'item' to trace accesses print 'accessing cell', i return Stack.__getitem__(self, i)