if func == None or getattr(func, 'command', False) == False:
    continue
for validator in func.validators:
    if not validator(self, *args, **kwargs):
        break
else:
    commands.append(command)
return commands
How to handle 'self' argument with Python decorators