[Tutor] Another Question

alan.gauld@bt.com alan.gauld@bt.com
Tue, 16 Jan 2001 17:44:10 -0000

> How can the method fun in class B use its option tuple to 
> call the fun method in the class A?

I assume I'm missing the point here but this seems to do it...

>>> class A:
...  def fun(s,*o):
...    print "A fun"
>>> class B(A):
...  def fun(s,*o):
...    A.fun(s,o)
>>> b = B()
>>> b.fun(1,2,3)
A fun

> The problem is caused because we can change the tuple (options).

You can create a new tuple but you can't change the original. Tuples 
are immutable.

I think I'm missing the issue.

Alan G.