<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
&sup3;p wrote:
<blockquote
 cite="mid:%3C797c8cbd1003242042s32ee16bbxe6d937a16ab35a50@mail.gmail.com%3E"
 type="cite">
  <div>Hi:</div>
  <div> </div>
  <div class="gmail_quote">On 25 March 2010 11:17, Alan Harris-Reid <span
 dir="ltr"><<a moz-do-not-send="true"
 href="mailto:aharrisreid@googlemail.com">aharrisreid@googlemail.com</a>></span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
    <br>
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from a parent class, for example<br>
    <br>
def mymethod(self):<br>
  super().mymethod()<br>
  some more code...<br>
    <br>
Is there any way of writing the code so that the super() call is
generic and automatically recognises the name of the current method
(ie. something like super().thismethod()) or do I always have to repeat
the method name after super()?<br>
    <br>
TIA,<br>
Alan<br>
    <font color="#888888">-- <br>
    <a moz-do-not-send="true"
 href="http://mail.python.org/mailman/listinfo/python-list"
 target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
    </font></blockquote>
  </div>
  <br>
  <br>
  <div><br>
  </div>
  <div>   I think, the super() method is designed to delegate any
method call to one of the class in its mro list, and the super()
function its self return a 'super' object, so it is better to write
what method you want to delegate, maybe it's not the current method. <br
 clear="all">
  <br>
-- <br>
Best wishes from Ray ...<br>
  </div>
</blockquote>
Thanks Ray - I'll stick to repeating the method name.<br>
<br>
Regards,<br>
Alan<br>
<br>
</body>
</html>