# More Features, Same Object

More Features, Same Object: Decorator: Same Phone, More Features, Decorators the Modern Way: Wrapping a Function.

Updated: November 17, 2026

1. [Decorator: Same Phone, More Features](https://www.ask-codey.com/lessons/dp-decorator) (Journeyman): SkyCast is slow and counts every call, so the hub needs today's weather remembered and every ask logged; subclasses for each combination (cached, logged, cached and logged) multiply with every feature, while decorators wrap the weather source in small layers that keep its interface, so features stack in any order without changing SkyCast.
2. [Decorators the Modern Way: Wrapping a Function](https://www.ask-codey.com/lessons/dp-decorator-modern) (Journeyman): When the hub needs the same cache in front of tomorrow's forecast as in front of today's weather, a decorator class per method multiplies again; a function that takes a function and returns a better one adds the feature to any call, and Python's @ and TypeScript's decorators are language shortcuts for that same move, applied where a function or class is defined.

Source: https://www.ask-codey.com/courses/design-patterns/topics/dp-more-features-same-object
