关于PEP 8
PEP 8,Style Guide forPythonCode,是Python官方推出编码约定,主要是为了保证 Python 编码的风格一致,提高代码的可读性。
官网地址:https://ments should have a space after the hash. if bar: bar += 1 bar = bar * bar else: some_string = """ Indentation in multiline strings should not be touched.Only actual code should be reindented."""
第一种方式:
编写完代码后,右键选择「Extern Tools」–>「autopep8」
第二种方式:
选择菜单「Tool」–>「Extern Tools」–>「autopep8」即可
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。