"Eric Dorsey" wrote
class A:
def __init__(self, name, value=1):
self.name = name
self.value = value
And now I want a subclass, one that overrides the value=1 and defaults to
value=2, how do I code that? I'm understanding subclasses that have
different methods that have differ
On Tue, Apr 14, 2009 at 11:27 AM, Eric Dorsey wrote:
> Hi tutors, I am studying classes a bit, and am having trouble with this
> concept and would appreciate your help!
>
>
> class A:
> def __init__(self, name, value=1):
> self.name = name
> self.value = value
>
> And now I wan
Hi tutors, I am studying classes a bit, and am having trouble with this
concept and would appreciate your help!
class A:
def __init__(self, name, value=1):
self.name = name
self.value = value
And now I want a subclass, one that overrides the value=1 and defaults to
value=2, h