질문자 :Joan Venge 다음과 같이 클래스를 초기화하지 않고 호출할 수 있는 정적 메서드를 Python에서 가질 수 있습니까? ClassName.static_method() 예, staticmethod 데코레이터를 사용하여 class MyClass(object): @staticmethod def the_static_method(x): print(x) MyClass.the_static_method(2) # outputs 2 일부 코드는 데코레이터가 아닌 함수로 staticmethod 를 사용하여 정적 메서드를 정의하는 이전 메서드를 사용할 수 있습니다. 이것은 고대 버전의 Python(2.2 및 2.3)을 지원해야 하는 경우에만 사용해야 합니다. class MyClass(object): def the..