On 12/11/2013 4:55 AM, JL wrote:
What is the advantage to using a main()?
In addition to what's been said I add:
It separates all the global activities: defining of functions and classes, importing modules, etc. from the "doing" the actual task of the program.
It also ensures that the defining all the classes and functions happens before referencing them (less "bookkeeping" for me).
These two allow me to write the main program first, and follow it with all the global stuff.
-- https://mail.python.org/mailman/listinfo/python-list