Re: [Tutor] attribute overwrite

2011-12-09 Thread Prasad, Ramit
o: tutor@python.org Subject: Re: [Tutor] attribute overwrite On Fri, Dec 9, 2011 at 4:43 PM, rail shafigulin wrote: i need to overwrite and attribute from the inherited class. i also need to run the constructor of the super class. here is the code import datetime class DateTime(datetime.date

Re: [Tutor] attribute overwrite

2011-12-09 Thread rail shafigulin
On Fri, Dec 9, 2011 at 4:43 PM, rail shafigulin wrote: > i need to overwrite and attribute from the inherited class. i also need to > run the constructor of the super class. here is the code > > import datetime > > class DateTime(datetime.datetime): > def __init__(self, year, month, day, *args):

[Tutor] attribute overwrite

2011-12-09 Thread rail shafigulin
i need to overwrite and attribute from the inherited class. i also need to run the constructor of the super class. here is the code import datetime class DateTime(datetime.datetime): def __init__(self, year, month, day, *args): super().__init__(year, month, day, *args) if self.year >= 1