if __name__ == 'main': & passing an arg to a class object

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Sat Apr 28 04:46:28 EDT 2007


alisonken1 wrote:

[if __name__ == "__main__"]
> These are samples to give the programmer an idea of how the code
> is supposed to work. 

No, this belongs into comments or docs. The contents of this block
are often used for testing or debugging, or for normally executable
code if it makes sense to call the module directly.

Regards,


Björn

-- 
BOFH excuse #224:

Jan  9 16:41:27 huber su: 'su root' succeeded for .... on /dev/pts/1




More information about the Python-list mailing list