You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
결과적으로 클래스는 그 자체를 렌더링 하는 것에만 신경쓰면 됩니다. 클래스는 인스턴트화 중에 버전 텍스트를 받고 이 텍스트는`get_version()`라는 분리된 함수에 의해 생성됩니다. 클래스를 변경하는 것이
823
-
The result is that the class only needs to take care of rendering itself. It
824
-
receives the version text during instantiation and this text is generated by
825
-
calling a separate function,`get_version()`. Changing the class has no impact
826
-
on the other, and vice-versa, as long as the contract between them does not
827
-
change, i.e. the function provides a string and the class`__init__` method
828
-
accepts a string.
829
-
830
-
As an added bonus, the`get_version()` is now reusable elsewhere.
822
+
결과적으로 클래스는 렌더링 그 자체에만 신경쓰면 됩니다. 클래스는 인스턴트화 중에 버전 텍스트를 받고 이 텍스트는`get_version()`라는 분리된 함수에 의해 생성됩니다. 클래스를 변경해도 다른 요소에 영향이 가지 않으며, 이는 반대의 경우에도 마찬가지입니다. 즉, 함수는 문자열을 제공하고 클래스의`__init__` 메서드는 문자열을 수용합니다.