クラスとDRY原則

Pythonで学ぶSoftware Engineeringの原則

Adam Spannbauer

Machine Learning Engineer at Eastman

SocialMediaクラスの作成

  ソーシャルメディアクラスのファイル

Pythonで学ぶSoftware Engineeringの原則

DRY原則

DRYの傘

Pythonで学ぶSoftware Engineeringの原則

DRY原則

DRYの傘

Pythonで学ぶSoftware Engineeringの原則

DRY原則

DRYの傘

Pythonで学ぶSoftware Engineeringの原則

DRY原則

DRYの傘

Pythonで学ぶSoftware Engineeringの原則

継承の導入

  Documentクラスからの継承

Pythonで学ぶSoftware Engineeringの原則

Pythonの継承

継承の構造

Pythonで学ぶSoftware Engineeringの原則

Pythonの継承

# Import ParentClass object
from .parent_class import ParentClass

# Create a child class with inheritance class ChildClass(ParentClass): def __init__(self): # Call parent's __init__ method ParentClass.__init__(self)
# Add attribute unique to child class self.child_attribute = "I'm a child class attribute!"
# Create a ChildClass instance child_class = ChildClass() print(child_class.child_attribute) print(child_class.parent_attribute)
Pythonで学ぶSoftware Engineeringの原則

Let's Practice

Pythonで学ぶSoftware Engineeringの原則

Preparing Video For Download...