Python文档字符串报错:TypeError: __call__() takes from 1 to 2 positional arguments but 3 were given

时间:2024-03-23 18:26:28

1.问题:在使用文档字符串时,报错:TypeError: call() takes from 1 to 2 positional arguments but 3 were given
2.原因分析:由于初步学习python,看不懂问题所在,找了半天,终于找到问题所在,误将程序中的点写成了逗号。help(testrr,doc)
Python文档字符串报错:TypeError: __call__() takes from 1 to 2 positional arguments but 3 were given
3.解决:找到问题所在后,将语句写正确,问题解决。
Python文档字符串报错:TypeError: __call__() takes from 1 to 2 positional arguments but 3 were given
备注:仅以此帖记录学习中的问题,便于回顾,未进行深入分析。