I am trying to execute this:
def our_decorator(func):
def function_wrapper(x):
print("Before calling " + func.__name__)
func(x)
print("After calling " + func.__name__)
return function_wrapper
@our_decorator
def foo(x):
print("Hi, foo has been called with " + str(x))
foo("Hi")
============================================== ======================
Получили эту ошибку и не можете объяснить почему?
def our_decorator (fun c): ... def function_wrapper (x): ... print («Перед вызовом» + fun c. name ) ... веселье c (x) ... print ("После звонка" + веселье c. имя ) ... return function_wrapper ... @our_decorator File "", строка 7 @our_decorator ^ SyntaxError: недопустимый синтаксис