Why doesn\'t the following work (Python 2.5.2)?
>>> import datetime >>> class D(datetime.date): def __init__(self, year):
You should probably use a factory function instead of creating a subclass:
def first_day_of_the_year(year): return datetime.date(year, 1, 1)