[Tutor] Little subclass understanding problem

2007-11-15 Thread Michael H. Goldwasser
Oops... Just finished sending my earlier response and realize that I overlooked an issue. The code from http://viner.tv/go?set is potentially errant. When invoking the base class constructor, self should have been explcitly sent as a parameter, using the syntax class Set(list):

Re: [Tutor] Little subclass understanding problem

2007-11-15 Thread Kent Johnson
Tom wrote: > I am trying to understand what happens in the following scenario: > > class Sub_class(Base_class): > def __init__(self, data): > Base_class.__init__(self, data) > > as in: > > # snippet from http://viner.tv/go?set > class Set(list): > def __init__(self, value = []):

[Tutor] Little subclass understanding problem

2007-11-15 Thread Michael H. Goldwasser
On Thursday November 15, 2007, Tom wrote: >I am trying to understand what happens in the following scenario: > >class Sub_class(Base_class): >def __init__(self, data): >Base_class.__init__(self, data) > >as in: > ># snippet from http://viner.tv/go?

[Tutor] Little subclass understanding problem

2007-11-15 Thread Tom
I am trying to understand what happens in the following scenario: class Sub_class(Base_class): def __init__(self, data): Base_class.__init__(self, data) as in: # snippet from http://viner.tv/go?set class Set(list): def __init__(self, value = []): list.__init__([]) The l