Learning the "PEP 8 -- Style Guide for Python Code" - part 1
2021-03-18 00:25
Tabs or Spaces?
Spaces are the preferred indentation method.
Tabs should be used solely to remain consistent with code that is already indented with tabs.
Python 3 disallows mixing the use of tabs and spaces for indentation.
Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively.
When invoking the Python 2 command line interpreter with the -t option, it issues warnings about code that illegally mixes tabs and spaces. When using -tt these warnings become errors. These options are highly recommended!
Comments:
No more agree then unify the code !
上一篇:【Java】递归总结
下一篇:Java动态绑定
文章标题:Learning the "PEP 8 -- Style Guide for Python Code" - part 1
文章链接:http://soscw.com/index.php/essay/65535.html