def test1(func): def test2(root,key): if root == "root" and key ==123: print("您的用户名和密码输入正确") else: print("您的用户名或密码输入错误") return test2 @test1 def test3(root,key): pass test3("root",1234)
输出>>>您的用户名或密码输入错误
def test1(func): def test2(root,key): if root == "root" and key ==123: print("您的用户名和密码输入正确") else: print("您的用户名或密码输入错误") return test2 @test1 def test3(root,key): pass test3("root",1234)
输出>>>您的用户名或密码输入错误