top of page

Decorators in Python?

Updated: Feb 10, 2023

Decorators are used to modify the behavior of function or class. In Decorators, functions are taken as the argument into another function and then called

inside the wrapper function.



output:
</h1>
Hello World
</h1>

Where you implemented decorator in your project code.?

decorators are easy to add log statements, to any function call.



output:
sum function call started
sum is  30
sum function call ended 


Thanks for reading!!!

Your Rating and Review will be appreciated!!

Twitter: @LearnerLandmark

Comments

Rated 0 out of 5 stars.
No ratings yet

Commenting on this post isn't available anymore. Contact the site owner for more info.

#7-1-619/A/3/B, Plot No 48, SAP street, Gayathri Nagar, Behind Maitrivanam, Hyderabad 500 038.

Subscribe Form

Thanks for submitting!

91 9693996999

Python Interview Questions | Python Interview Questions for freshers |  Python Coding Questions and Answers | python programming interview questions | python technical interview questions |  python interview questions and answers for experienced | python basic interview questions and answers | Python coding questions |  Top Python interview questions

  • Youtube
  • Facebook
  • Twitter
  • LinkedIn

©2023 by Learner Landmark. All Rights Reserved.

bottom of page