[Tutor] Another Question

XIA Xiao-Qin XQ.Xia@ccsr.cam.ac.uk
Tue, 16 Jan 2001 15:49:05 +0000


--=====_97966014541=_
Content-Type: text/plain; charset="WINDOWS-1250"
Content-Transfer-Encoding: quoted-printable

Sorry, I have so many question. Here is another one:

class A:
    def fun(self, *options):
        ... # some codes here

class B(A):
    def fun(self, *options):
        ...# some codes here
        ...# I need to call fun in class A here

How can the method fun in class B use its option tuple to call the fun=
 method in the class A?
The problem is caused because we can change the tuple (options).

Sincerely, 
Xia XQ


--=====_97966014541=_
Content-Type: text/html; charset="WINDOWS-1250"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content="text/html; charset=windows-1250" http-equiv=Content-Type>
<META content='"MSHTML 4.72.3612.1700"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff style="FONT-FAMILY: Arial" text=#000000>
<DIV><FONT color=#000000 size=2>Sorry, I have so many question. Here is another 
one:</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>class A:</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; def fun(self, 
*options):</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... # 
some codes here</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>class B(A):</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; def fun(self, 
*options):</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...# 
some codes here</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...# 
I need to call fun in class A here</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>How can the method fun in class B use its option 
tuple to call the fun method in the class A?</FONT></DIV>
<DIV><FONT color=#000000 size=2>The problem is caused because we can change the 
tuple (options).</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>Sincerely, </FONT></DIV>
<DIV><FONT color=#000000 size=2>Xia XQ</FONT></DIV></BODY></HTML>


--=====_97966014541=_--