John Roth wrote:This is a key point. I wonder whether we might use this thread to draft a patch to the docs for submission on SourceForge?What happens with the second operand is a bit of sleight of hand. The object returned from super() gives you access to the methods on the next level up the mro, however when you use it to invoke a method, then the 'self' passed to that method is the second object, not the instance returned from super().
Done:
www.python.org/sf/1163367
It's nowhere near perfect, but I think it at least somewhat more accurately reflects the actual workings of super. If you have any good clarifications or rewordings, please feel free to add them to the tracker.
While I also agree that the documentation needs a major revamp to properly show the interworkings of all the new-style class components, a patch for super is about the best I can offer at the moment. =)
STeVe -- http://mail.python.org/mailman/listinfo/python-list