[Tutor] Function decorators

Mats Wichmann mats at wichmann.us
Mon Nov 30 10:43:06 EST 2020


On 11/30/20 7:39 AM, Manprit Singh wrote:
> Dear sir,
> 
> I tried to understand the concept of function decorators from various
> sources but couldn't .
> 
> Can i request you a small text that describes the decorators along with an
> example .
> 
> I am sorry if I said something wrong.

Don't worry, decorators are a source of some confusion for many (not 
using them, which is easy, but what they actually are).  Both of these 
sources are usually very good, try looking them over and seeing if they 
help:

https://realpython.com/primer-on-python-decorators/

https://jeffknupp.com/blog/2013/11/29/improve-your-python-decorators-explained/

If not, come back with some slightly more direct questions and folks 
here should be able to help.




More information about the Tutor mailing list