Title: Function decorators
Open Graph Title: Python function decorators
Description: “Decorator syntax” refers to some syntactic sugar in Python that lets you simultaneously define a function ‘f’ and apply a function ‘g’ to the function you just defined. ‘f’ is called the “decorated” function, and ‘g’ is called the “decorator.” Here we look at several examples using decorators in Python, compare them to similar situations in Haskell, and discuss how lambdas let us achieve the same result without having a special syntax for decorators.
Open Graph Description: “Decorator syntax” refers to some syntactic sugar in Python that lets you simultaneously define a function ‘f’ and apply a function ‘g’ to the function you just defined. ‘f’ is called the “decorated” function, and ‘g’ is called the “decorator.” Here we look at several examples using decorators in Python, compare them to similar situations in Haskell, and discuss how lambdas let us achieve the same result without having a special syntax for decorators.
X: @typeclasses
Domain: typeclasses.com
| theme-color | #31365f |
| og:image | https://static.typeclasses.com/twitter-python__decorators-e369da8484.png |
| og:type | article |
| article:tag | Scotty |
| twitter:card | summary_large_image |
Links:
Viewport: width=device-width, initial-scale=1