Call Class Method From Another Class 在另一个类中调用类方法

11 浏览
0 Comments

Call Class Method From Another Class 在另一个类中调用类方法

有没有办法从另一个类中调用一个类的方法?我希望有类似于PHP的call_user_func_array()的方法。以下是我希望发生的情况:

class A:
    def method1(arg1, arg2):
        ...
class B:
    A.method1(1, 2)

0