Feb-24-2024, 06:07 AM
(Feb-23-2024, 04:25 PM)drcl Wrote: How is that good if I want to use my function in other decorators?You use the decorator on your function, not your function in decorators.
Actually the decorators are just a syntactic sugar to pass a function into other function
Also maybe have a look at Is a Python Decorator the same as Java annotation, or Java with Aspects?
Other useful SO question to understand decorators How do I make function decorators and chain them together?
Primer on Python Decorators
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs