0
Non type object is not callable
#your code goes here def decor(func): def wrap(): print("***") func() print("***") print("END OF PAGE") return wrap @decor def invoice(): print("INVOICE #" + input()) invoice() Why is invoice() a non type object?
2 Réponses
+ 5
Decorator function should return a function.
In decor() function your function doesn't return anything as return statement is under wrap() function which was never called.
Remove 1 tab from return wrap .
0
Thank you MD Sayed!