• Intent ⇒ adding/removing at run-time responsibilities to an object via object composition (instead of fixed inheritance)
  • Components
    • Abstract component ⇒ Abstract pattern for all products (decorators and original)
    • Concrete component ⇒ original object to be decorated
    • Abstract decorator ⇒ holds a reference to the original. Builds on top of it
    • Concrete decorator
  • Python usage
    • Just use @ wrappers
    • Python executes all the code inside the decorator as it imports the file. Then, the one inside the function when being called
    • For paramterizable you have a decorator nested inside another one. Python manages the double execution for u
  • Use cases
    • Auth
    • Logging
  • Code