Skip to content

Corresponsible/boot_camp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is the purpose of decorators?

Decorators in python are used to exdend a function's functionality without having to change the function itself. A decorator wraps around a function to perform actions that alter or extend the result to be obtained.

While this could be as well done by nesting functions into one another, and decorators are essentialy what's called "syntax sugar", they make it much easier and quicker to work with complicated and\or voluminous code. Moreover, you can call any kind of functions under same decorator.

The common uses for decorators are execution time measurement, logging, and building routes in frameworks like Django or Flask.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages