Re:Wield Python's super() like a Jedi
by jessedhillon on Friday May 27, 2011 @04:01AM
(#2590765)
Yeah you're right, I was mistaken. super uses the MRO of the first argument, or inspects the stack if none is given.
BTW your sighing is not necessary.
Re:Wield Python's super() like a Jedi
by Peristarkawan on Friday May 27, 2011 @01:13PM
(#2592191)
I apologize. It was late, and my supply of patience for the day was exhausted.
"super(Reader).read()", if you actually try it, will just result in an AttributeError. This is because super(Reader) returns an unbound super object, not a bound super object that you can actually dispatch from. Why this advanced usage might be useful is beyond the scope of this thread, but if you're curious then just google for python unbound super and hit the Feeling Lucky button.