原文:TypeError: translate() takes exactly one argument (2 given)

python . 下使用translate None, string.punctuation 去除句子中的标点符号,报错:TypeError: translate takes exactly one argument given 原因是python版本的问题,python 下该语句正常执行,python 中translate的参数只有一个,正确做法: sentence The girl is a ...

2018-11-10 11:18 0 1186 推荐指数:

查看详情

Python 'takes exactly 1 argument (2 given)' Python error

Python,定义urlConfig 接收参数,正常传递参数时,出现,多给了一个参数的错误问题, 定义class的函数之后,在调用的时候出现“'takes exactly 1 argument (2 given)' Python error”。 查询Interesting ‘takes ...

Fri Oct 18 18:40:00 CST 2019 0 314
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM