How to break a line in a function definition in Python according to pep8?
问题 I have the following line of code that is just over the limit of 79 characters: def ReportResults(self, intTestID, startTime, stopTime, version, serverType): How do I break the line in the correct way according to pep8? 回答1: According to PEP8: The Python standard library is conservative and requires limiting lines to 79 characters (and docstrings/comments to 72). This is in my opinion the main rule to observe. Besides this rule, PEP8 recommends aligning brackets, so I would do something like: