How about some syntactic sugar for " __name__ == '__main__' "?

Chris Angelico rosuav at
Thu Nov 13 09:58:56 CET 2014

On Thu, Nov 13, 2014 at 7:47 PM, Cameron Simpson <cs at> wrote:
> My view is that if there's a main (i.e. the module implements a small app
> all on its own, however tiny), then the main program logic should come
> first. The details follow later.

Ah, I see. Makes sense. It's kinda like an executable docstring. Still
not my preferred style, but makes its own sense.


More information about the Python-list mailing list