Decorator Chaining

0

Decorator Chaining 

  • We can define multiple decorators for the same function and all these decorators will form Decorator Chaining. 

Eg: 

  • @decor1 
  • @decor 
  • def num(): 
For num() function we are applying 2 decorator functions. First inner decorator will work and then outer decorator.

Demo Program for decorator Chaining:


Post a Comment

0Comments
Post a Comment (0)