I'm testing a skeleton for a program in python that evaluates times given in the form (hh, mm, ss, zz) where hh is hours, mm is minutes, ss is seconds, and zz is the difference from UTC. Basically, for the init function, I would like to be able to evaluate inputs in the console and pass them regardless of whether or not they have the correct amount of positional arguments. Here is my code:
class Time(object):
def __init__(self, hh, mm, ss, zz):
'''takes initial time values'''
pass
Currently, the program will take variables typed into the console with the appropriate amount of variables like so:
A = times.Time(1, 2, 3, 4)
But will give a TypeError with init() missing required positional arguments with these:
B = times.Time(1,2,3)
C = times.Time(1,2)
Is there a way to allow these to pass?