Foundation Subscription > Software Development > Create Decorators to Add Functionality to Existing Functions
Course Description
The Decorator pattern is a general concept that can be used in many programming languages. Python has a particular notion of what a decorator is: it is a function that takes a function or class and returns a new function or class. These Python decorators can be automatically applied to functions or classes by prepending an "@" to the name, and using it as part of the function or class definition. In this course, you'll see a lot of examples of how and why you would use a decorator. We'll go in-depth to thoroughly understand what a decorator actually does and how to easily build your own from scratch.
  • Students should already be comfortable with Python language fundamentals, including: writing and using classes, methods, and functions, using container objects (e.g., list or dictionary), using decorators, using string formatting, using conditional operators
Michael Dougherty
Michael Dougherty is an experienced full-stack engineer, functional programming aficionado, and musician. When he was 13 he brought a "Learn C++ in 21 days" book with him on a family vacation, and he has been writing code ever since. For the past few years, Michael has worked as a Web Development Mentor, as a Full Stack Senior Software Engineer, as well as on several side projects.