开始学习第二辑 more python for beginners
talking about formating
https://learn.microsoft.com/en-us/shows/more-python-for-beginners/formatting-and-linting–more-python-for-beginners-2-of-20
Formating 代码格式化:使用pylint工具来帮助遵循PEP8(python enhancement proposal#8)的规范写代码
- 通常规则:
- space, not tabs
- variable_name, not variableName or VariableName
- avoid extraneous whitspace (should be {‘good’: 43})
- pip[3] install pylint
Note:
VSC also have the tool, 他只会在你没有通过pip install 安装pylint的时候生效,另外pylint会在每次保存文件的时候检测formating,有问题的部分会标波浪线。
eg: 比如这里多一个空格,下面会有个波浪线,pylint会识别到的
Docstring
To be continue…