I'm trying to inherit a datetime.date into a new object which takes an extra parameter:
class FullDate:
def __new__(cls, lst, date): # initiate the date class - bit complicated
inst = super(FullDate, cls).__new__(cls, date.year, date.month, date.day)
# do stuff
When I try to make an instance of the date I get the below error:
Traceback (most recent call last):
File "<pyshell#55>", line 8, in <module>
to_load = FullDate(y[key], key)
File "/home/milo/Documents/Codes/PyFi/lib/Statement/Classes.py", line 518, in __new__
inst = super(FullDate, cls).__new__(cls, date.year, date.month, date.day)
TypeError: object() takes no parameters
I've been researching why this happens but have come up empty so far.