paint-brush
What You Probably Don't Know About Python Decoratorsby@regquerlyvalueex
4,665 reads
4,665 reads

What You Probably Don't Know About Python Decorators

by Alex Zaiets6mOctober 31st, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A python decorator is a special kind of function that either takes a function and returns a class, or takes a class. A decorator pattern wraps an object and dynamically adds some functionality to it. Decorators provide a flexible alternative to inheritance for extending functionality. Any callable can be used as decorator, including functions, methods, functors and functions. A lot of people underestimate the power of decorators in python, because they have the same name, but can do a lot more.

Company Mentioned

Mention Thumbnail
featured image - What You Probably Don't Know About Python Decorators
Alex Zaiets HackerNoon profile picture
Alex Zaiets

Alex Zaiets

@regquerlyvalueex

Python developer

Learn More
LEARN MORE ABOUT @REGQUERLYVALUEEX'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Alex Zaiets HackerNoon profile picture
Alex Zaiets@regquerlyvalueex
Python developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite