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
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):
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