+ 6
We have a slider_encoder(self) function inside a RobotController class with a self parameter, How dow w call this function outsi
We have a slider_encoder(self) function inside a RobotController class with a self parameter, How do we call this function outside the class?
3 Respostas
+ 4
It would help to see the code.
If it is just a normal method, it works like this:
The definition goes
def method_x(self, arg):
...
and the method call goes
instance.method_x(arg)
So you just leave out the self when you call it (that's where instance internally goes).
+ 3
+ 2
🤔 i tag you because i see tkinter
After reading your answer, looks like i can answer myself too 😂