I'm new to this
I'm using Python 3.5
I have my own .NET library class that does not have a parameterless constructor. I want to subclass it in python and create a parameterless constructor. However, python always throws an error when I do not specify parameters on creating an instance of the class. The parameters for the C# class constructor is int, int.
sub class
class TestConsole(SadConsole.Consoles.Console):
def __init__(self):
super().__init__(80, 25)
super().Print(0, 0, "right constructor")
def __init__(self, x, y):
super().__init__(x, y)
super().Print(0, 0, "wrong constructor")
calling code that crashes with error
new_console = TestConsole()
force parameters, it works fine, but obviously prints out "wrong constructor"
new_console = TestConsole(80, 25)
I'm new to this
I'm using Python 3.5
I have my own .NET library class that does not have a parameterless constructor. I want to subclass it in python and create a parameterless constructor. However, python always throws an error when I do not specify parameters on creating an instance of the class. The parameters for the C# class constructor is
int, int.sub class
calling code that crashes with error
force parameters, it works fine, but obviously prints out "wrong constructor"