Michalis Giannakidis wrote: >> in general, methods on C objects are implemented in terms of operations >> on the internal data structures, not in terms of a subset of the methods >> already provided by the object. > > But what is the reason that the assignment > l[2] = 6 > call my function, but > l.append(3)
"obj[index] = value" maps to "obj.__setitem__(index, value)". reading the documentation might help; start here: http://docs.python.org/ref/specialnames.html </F> -- http://mail.python.org/mailman/listinfo/python-list