0

Call normal function without decorator

Hi I have a function decorated with decorator. Can we have both function call possible one with decorator and one without it? In other words, myfunc should have both option to get it called with or without decorator? https://sololearn.com/compiler-playground/cWQ679FmL4PC/?ref=app

23rd Sep 2024, 3:50 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
8 Antworten
+ 1
Ketan Lalcheta you could try several methods, but you need external modules. The undecorated module looks promising, though. https://sololearn.com/compiler-playground/cox6QHE174u7/?ref=app
23rd Sep 2024, 10:48 PM
Bob_Li
Bob_Li - avatar
+ 3
Yes, if it's decorated from beginning then you can't call without decorator
23rd Sep 2024, 6:26 PM
Sharpneli
Sharpneli - avatar
+ 2
It's possible, decorator wrapper and callback
23rd Sep 2024, 5:50 PM
Sharpneli
Sharpneli - avatar
23rd Sep 2024, 5:58 PM
Sharpneli
Sharpneli - avatar
+ 1
Thanks Bob_Li
24th Sep 2024, 4:34 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Thanks Sharpneli I got your point. If we have myfunc already decorated, we can't call normal function. Is this correct ?
23rd Sep 2024, 6:24 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Thanks Sharpneli
23rd Sep 2024, 6:28 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Hl
24th Sep 2024, 6:37 AM
Sweta Kumari
Sweta Kumari - avatar