클래스와 DRY 원칙

Python으로 배우는 소프트웨어 공학 원칙

Adam Spannbauer

Machine Learning Engineer at Eastman

SocialMedia 클래스 만들기

  소셜 미디어 클래스 파일

Python으로 배우는 소프트웨어 공학 원칙

DRY 원칙

DRY 우산

Python으로 배우는 소프트웨어 공학 원칙

DRY 원칙

DRY 우산

Python으로 배우는 소프트웨어 공학 원칙

DRY 원칙

DRY 우산

Python으로 배우는 소프트웨어 공학 원칙

DRY 원칙

DRY 우산

Python으로 배우는 소프트웨어 공학 원칙

상속 소개

  Document 클래스로부터 상속

Python으로 배우는 소프트웨어 공학 원칙

Python의 상속

상속 구조

Python으로 배우는 소프트웨어 공학 원칙

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으로 배우는 소프트웨어 공학 원칙

Let's Practice

Python으로 배우는 소프트웨어 공학 원칙

Preparing Video For Download...