I was wondering if its possible when creating an abstract class with abstract methods if its possible to allow the implementations of those methods in the derived classes to have different amounts of parameters for each function.
I currently have for my abstract class
from abc import ABCMeta, abstractmethod
class View(metaclass=ABCMeta):
@abstractmethod
def set(self):
pass
@abstractmethod
def get(self):
pass
But I want to be able to implement it in one class with set having 1 parameter and get having 2
(set(param1)
and get(param1, param2)
),
and then in another class also inherit it but have 0 parameters for set
and 2 for get
(set()
and get(param1, param2)
).
Is this possible and if so how would I go about doing it