Second argument to super().
steven.bethard at gmail.com
Tue Mar 15 00:46:36 CET 2005
Steve Holden wrote:
> John Roth wrote:
>> 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().
> This is a key point. I wonder whether we might use this thread to draft
> a patch to the docs for submission on SourceForge?
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. =)
More information about the Python-list