How to use decorators in Python?

Answers were Sorted based on User's Feedback



How to use decorators in Python?..

Answer / nashiinformaticssolutions

Decorators are typically defined before the function they enhance. To use a decorator, we must first specify its function. Then, we write the function to which it is applied, simply placing the decorator function above the function to which it must be applied.

Is This Answer Correct ?    0 Yes 0 No

How to use decorators in Python?..

Answer / glibwaresoftsolutions

Decorators are typically defined before the function they enhance. To use a decorator, we must first specify its function. Then, we write the function to which it is applied, simply placing the decorator function above the function to which it must be applied.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is the meaning of @classmethod and @staticmethod ?

0 Answers  


What is the sleeping time of giraffe?

0 Answers  


So, what is an iterator, then?

0 Answers  


Point out the use of help() function?

0 Answers  


Do you know what the difference between lists and tuples is? Can you give

0 Answers  






What is the difference between methods & constructors?

0 Answers  


How will you reload a module of python, explain?

0 Answers  


Explain relational operators in python?

0 Answers  


How can we get home directory using '~' in python?

0 Answers  


Explain inheritance in python with example?

0 Answers  


What is abs in python?

0 Answers  


Explain global and local variables in python?

0 Answers  


Categories