![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FIR2Z7%2FbtsHQ8Olhvn%2FEw9K9micxKGDkydrxAcVOK%2Fimg.png)
🗺️ Design Pattern
[Design Pattern] Decorator Pattern - 데코레이터 패턴
Decorator Pattern데코레이터 패턴(Decorator Pattern)은 객체의 기능을 동적으로 추가하고 확장할 수 있는 패턴입니다.이 패턴은 상속을 사용하지 않고도 객체에 새로운 행동을 추가할 수 있게 해줍니다.데코레이터 패턴은 여러 개의 데코레이터 객체를 조합하여 다양한 기능을 동적으로 조합할 수 있는 유연성을 제공합니다.Decorator Pattern은 Object(객체)를 꾸며주는 역할을 합니다.원하는 기능으로 감싸서 사용할 수 있게 만들어주는 패턴 입니다.class Animal: def speak(self): passclass Cat(Animal): def speak(self): print("Meow", end='')class Dog(Animal): ..