Is it possible to create C-style "main" function in Python? (for teaching purposes)

Westley Martínez anikom15 at gmail.com
Wed Oct 5 12:37:06 EDT 2011


On Tue, Oct 04, 2011 at 08:20:34PM -0700, alex23 wrote:
> Steven D'Aprano <steve+comp.lang.pyt... at pearwood.info> wrote:
> > Imported modules are variables like any other, and as they usually exist
> > in the global scope, so they will all need to be explicitly referenced as
> > global. This will get tiresome very quickly, and is a cure far worse than
> > the disease, and alone is enough to disqualify this suggestion from
> > serious consideration.
> 
> But on the gripping hand, it is a clear triumph of "Explicit is better
> than implicit." ;)
>

Simple is better than complex.
Readability counts.



More information about the Python-list mailing list