0

Is it possible in python to call a function from a class?

14th Sep 2020, 1:56 PM
Lotles
Lotles - avatar
4 odpowiedzi
+ 5
What functions do you mean? Build- in functions or user defined functions? In general you can have 3 kind of user defined functions / methods in classes: - instance methods - class methods - static methods each of them has their specific use. If you want to get more in depth of this, you may read: https://realpython.com/instance-class-and-static-methods-demystified/
14th Sep 2020, 2:31 PM
Lothar
Lothar - avatar
+ 3
Yes you can. call functions / methods in a class. Have you done a try so far? If yes, please post it here. If not try to do it. If you stuck somewhere, you can ask for help. You should also read the link i posted for you. You can find good samples and explanations in this tutorial.
14th Sep 2020, 7:39 PM
Lothar
Lothar - avatar
14th Sep 2020, 2:12 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
Lothar, I talked about calling a function from a class
14th Sep 2020, 2:33 PM
Lotles
Lotles - avatar