А
Size: a a a
А
А
M
ПЯ
M
А
Go
А
M
M
БГ
py3
def decor(func):
n = 1
def wrapped(*args):
print(n)
return func()
@decor
def t():
print(n)
t()
Traceback (most recent call last):
File "1058145070/source.py", line 9, in <module>
t()
TypeError: 'NoneType' object is not callable
M
БГ
А
ПЯ
py3
def decor(func):
n = 1
def wrapped(*args):
print(n)
return func()
@decor
def t():
print(n)
t()
Traceback (most recent call last):
File "1058145070/source.py", line 9, in <module>
t()
TypeError: 'NoneType' object is not callable
А
py3
def decor(func):
n = 1
def wrapped(*args):
print(n)
return func()
@decor
def t():
print(n)
t()
Traceback (most recent call last):
File "1058145070/source.py", line 9, in <module>
t()
TypeError: 'NoneType' object is not callable
M
БГ
py3
def decor(func):
n = 1
def wrapped(*args):
print(n)
return func()
return wrapped
@decor
def t():
print(n)
t()
Traceback (most recent call last):
File "1818234590/source.py", line 10, in <module>
t()
File "1818234590/source.py", line 5, in wrapped
return func()
File "1818234590/source.py", line 9, in t
print(n)
NameError: name 'n' is not defined
1
А