def trr(a,b): return a+b def trr(a): return a print(trr(1,2)) #TypeError: trr() takes 1 positional argument but 2 were given print(trr(1)) #输出1
python 没有方法重写
最新推荐文章于 2023-07-24 16:56:13 发布
def trr(a,b): return a+b def trr(a): return a print(trr(1,2)) #TypeError: trr() takes 1 positional argument but 2 were given print(trr(1)) #输出1