Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80675

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

References <CAPTjJmr9BbFQzEYzWgW+2Y_cB-kSaXZZQ0nK4Mr=TJf7i0dZXQ@mail.gmail.com> <20141113084725.GA97979@cskk.homeip.net>
Date 2014-11-13 19:58 +1100
Subject Re: How about some syntactic sugar for " __name__ == '__main__' "?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.15769.1415869145.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Nov 13, 2014 at 7:47 PM, Cameron Simpson <cs@zip.com.au> 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.

ChrisA

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: How about some syntactic sugar for " __name__ == '__main__' "? Chris Angelico <rosuav@gmail.com> - 2014-11-13 19:58 +1100
  Re: How about some syntactic sugar for " __name__ == '__main__' "? Roy Smith <roy@panix.com> - 2014-11-13 08:33 -0500
    Re: How about some syntactic sugar for " __name__ == '__main__' "? Chris Angelico <rosuav@gmail.com> - 2014-11-14 00:40 +1100

csiph-web