Problem subclassing tuple
John Wilson
tug at wilson.co.uk
Tue Apr 29 12:19:13 EDT 2003
----- Original Message -----
[snip]
>
> Howdy.
>
> First of all... What are you trying to do? :-)
I am trying to add some methods to a tuple. Obviously the example I posted
has been considerably simplified to just demonstrate the problem I'm hitting
;-))
>
> Second. If that's the full definition and intention
> of "Holder", then you might want to know (or are
> overlooking) the fact that "values", inside __init__,
> is already a tuple.
Yes, but I want an object which has all the characteristics of a tuple with
additional methods.
I could use delegation to do this but subclassing appeared to be an easier
way.
I'm really quite interested in why this doesn't work. I *thought* I'd
grasped the concept of the new style classes but this seems to demonstrate
that I haven't!
Thanks for the response.
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
More information about the Python-list
mailing list