Collins Congratulations for your first step into Python Programming.
You can call them script or programs(not necessarily but depends on what your 
coding for).
Yaa..it's always a good practice to call it through main(), but it doesn't 
really matter you 
can call the method in way....  

Regards,
Shambhu

-----Original Message-----
From: Colin Higwell [mailto:colinh@somewhere.invalid] 
Sent: 30/11/2011 1:37 AM
To: python-list@python.org
Subject: Total newbie question: Best practice

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




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to