在同一类中调用函数/方法时,类方法是否合适?不知道我是否使用这种方法违反了规则或惯例。示例:
class Tools:
@classmethod
def method_one(cls, foo, bar):
number = foo + bar
msg = cls.method_two(number)
print(msg)
@staticmethod
def method_two(num_num):
return f'{num_num} is the magic number'