On 13 Des, 02:20, Hrvoje Niksic <hnik...@xemacs.org> wrote: > > tmp = mytuple.__getitem__(0) > > tmp = tmp.__iadd__(1) > > mytuple.__setitem__(0, tmp) # should this always raise an exception? > > What do you mean by "a sane parser"? This is exactly what happens in > current Python.
Yes, but Steve Holden was suggesting mytuple.__iadd__ would be invoked. > The decision to also rebind > the result of __i*__ methods continues to baffle me. Python methods always have a return value, even those that seem to do not - they silently return None. Thus, __iadd__ must return self to avoid rebinding to None. -- http://mail.python.org/mailman/listinfo/python-list