我正在使用python 3.5.1编写,我是一名编程新手。
我根据pep8使用带有pyflakes和python style guide插件的gedit来显示样式错误。我不知道是否要遵循风格推荐信。
但是,我有E501: line too long (80 > 79 characters)
,E502: the backslash is redundant between brackets
和E128/E127/...: continuation line under-indented for visual indent
表示的三种反复出现的样式缺陷。屏幕截图如下。
我的两个问题是:
答案 0 :(得分:7)
“为了避免E501以及随后的样式错误E502和E127 / 128,我如何才能在python中进行换行?”
progress = Utils.ProgressMeter('Source strings separated by white '
'space are automatically concatenated by the '
'interpreter and parenthesis are the natural syntax '
'for line continuation. Remember to use trailing '
'spaces.')
由于错误E502已在括号内,因此反斜杠是多余的。你试过消除它吗?