我曾经读过(我认为在微软的一个页面上)当你不需要两个或更多类的实例时,这是一个使用静态类的好方法.
我正在用Python编写程序.如果我@classmethod用于课堂的每一种方法,这是一种糟糕的风格吗?
@classmethod
python static class instance class-method
class ×1
class-method ×1
instance ×1
python ×1
static ×1