def process_student(name): std = Student(name)
# std是局部变量,但是每个函数都要用它,因此必须传进去: do_task_1(std) do_task_2(std)
def do_task_1(std): do_subtask_1(std) do_subtask_2(std)
def do_task_2(std): do_subtask_2(std) do_subtask_2(std)
到底是怎么得了了,为什么不能一直这样传参数,求解释
Sign in to make a reply
风行米兰城
def process_student(name): std = Student(name)
def do_task_1(std): do_subtask_1(std) do_subtask_2(std)
def do_task_2(std): do_subtask_2(std) do_subtask_2(std)
到底是怎么得了了,为什么不能一直这样传参数,求解释