> Apparently, args already is a tuple, so this should be: > > def __getitem__(self, args): > > Is this documented somewhere? I couldn't find it anywhere. >
Don't know, I just assumed it would take multiple arguments because I knew I had seen the form d[1,2] before, which incidentally is equivalent to d[(1,2)] so I guess it makes sense that args is a tuple. -- http://mail.python.org/mailman/listinfo/python-list