<br><br><div><span class="gmail_quote">On 4/23/07, <b class="gmail_sendername">Michele Cella</b> <<a href="mailto:michele.cella@gmail.com">michele.cella@gmail.com</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Calling a method:<br><br> self.method(arg)<br><br>Calling a super method:<br><br> super self.method(arg)<br><br>That's consistent with:<br> * the way you call any other method<br> * the way you use any other keyword
</blockquote><div><br>But how would it *work*? I assume you want 'super' to take a single expression, and be an expression itself. How does it know which instance you want to 'super'? Does it specialcase the variable named 'self'? Threat 'everything up to the first dot' as 'the instance'? Specialcase the first argument to the method? (That's what '
super.foo()' would do.) How would you do things like:<br><br> # call the supermethod 'register' with the nonsuper 'callback':<br> super.register(self.callback)<br> # call the nonsuper 'register' with the supermethod 'callback'
<br> self.register(super.callback)<br> # call the 'frominstance' method of the 'innerclass' attribute on the superclass<br> super.innerclass.frominstance(self)<br></div></div><br>-- <br>Thomas Wouters <
<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!