What is a top-level statement in Python?

后端 未结 3 1517
长情又很酷
长情又很酷 2021-02-07 22:09

In the Python Guide\'s chapter on project structure, the term \"top-level statement\" is brought up a few times. I\'m not sure exactly what this refers to. My guess is it\'s any

3条回答
  •  青春惊慌失措
    2021-02-07 22:29

    In python, the statements which are not indented are called a top-level statement. Internally python gives a special name to top-level statement s as __main__.

提交回复
热议问题