It seems to me that the error is related in _input
but im not sure
import random
from functools import wraps
_input = input()
def name(command='help'):
def _name(func):
@wraps(func)
def inner(*args, **kwargs):
if _input == command:
func(*args, **kwargs)
return inner
return _name
@name(command='test')
def poo():
print('5')
@name(command='test_2')
def foo():
print('Hello')
>>>test
5
(Sorry for my English)