Total newbie question: Best practice

Colin Higwell colinh at somewhere.invalid
Tue Nov 29 15:06:30 EST 2011


Hi,

I am just starting to learn Python (I have been at it only a few hours), 
so please bear with me. I have a few very small scripts (do you call them 
scripts or programs?) which work properly, and produce the results 
intended.

However, they are monolithic in nature; i.e. they begin at the beginning 
and finish at the end. Having done a little reading, I note that it seems 
to be quite common to have a function main() at the start (which in turn 
calls other functions as appropriate), and then to call main() to do the 
work. 

Is that standard best practice?

Thanks




More information about the Python-list mailing list