我试着在一个python文件上运行2to3,但是它失败了,出现了下面的错误,我不能理解问题中的确切位置需要任何帮助。
[adsf@localhost direct]$ 2to3 ./views/statusformatter.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Can't parse ./views/statusformatter.py: ParseError:
bad input: type=22, value=u'=', context=('', (338, 31))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse ./views/statusformatter.py:
ParseError: bad input: type=22, value=u'=', context=('', (338, 31))发布于 2019-08-14 19:47:10
正如@wovano在my question中回答的一个类似(或者事实上可能是相同的)问题,2to3无法解析,因为这是正确的Python3语法,而不是Python2。在我的特殊情况下,它被命名为Python2中不存在的print函数的参数。
https://stackoverflow.com/questions/56523611
复制相似问题