Search code examples
pythonprogram-entry-pointpep8

Python Main Method Location Convention


What are the official guidelines for the location of the main method in a Python program?

Should it be written first (at the top of the program), last (at the bottom), or is it just preferential? I read through PEP8 and couldn't find anything.


Solution

  • There are no official guidelines referring to this.