已知如下Python类定义:
class MyClass:
# 实例方法
def instance_func(self, msg):
return f"实例方法:{msg}"
# 类方法
@classmethod
def class_func(cls, msg):
return f"类方法:{msg}"
# 静态方法
@staticmethod
def static_func(msg):
return f"静态方法:{msg}"