Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 699 Bytes

File metadata and controls

4 lines (3 loc) · 699 Bytes

higher-order-functions-and-decorators

Decorators are a syntactic feature available in Python that can serve as a convenient and concise tool for modifying, analyzing, or associating functions and methods at the point at which they are defined. Decorators allow programmers to leverage an additional form of modularity and composability within their solutions, helping them add or modify features and functionalities in a relatively quick, concise, and elegant way.

This article covers some background on higher-order functions that is necessary to understand how decorators work, presents an overview of how decorators are defined and used, and illustrates their utility via a few use cases.