目录 1. Introduction 介绍 2. A Foolish Consistency is the Hobgoblin of Little Minds 尽信书,则不如无书 3. Code lay-out 代码布局 3.1 Indentation 缩进 3.2 Tabs or Spaces? 制表符还是空格? 3.3 Maximum Line Length 行的最大长度 3.4 Should a line break before or after a binary operator? 在
if __name__== "__main__" 的意思(作用)python代码复用 转自:大步's Blog http://www.dabu.info/if-__-name__-__main__-mean-function-python-code-reuse.html 有人在学习python脚本时会发现有的脚本下面有几行代码; 1 2 if __name__== "__main__": main() 不明白其中的意思,其实这就是方便我们代码复用的,我们可以在