- 1

Whats wrong here?? Correct it please!!

def decor(func, text): def wrap(): print("============") func() text() print("============") return wrap @decor def print_text(): print("Hello world!") @decor def my_text(): print('Im here') print_text() my_text()

8th Jun 2020, 4:44 PM
Lucky Nayak
Lucky Nayak - avatar
3 odpowiedzi
+ 3
Lucky Nayak there you go, see the comments inside: https://code.sololearn.com/cbr6Ca52cx2j/?ref=app
9th Jun 2020, 9:11 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
Remove the 'text' parameter from the decor definition and remove calling it later with text() Should work then
8th Jun 2020, 9:36 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Im not able to understand!! please provide an example!!
9th Jun 2020, 8:46 AM
Lucky Nayak
Lucky Nayak - avatar