(original) (raw)
On Mon, Jun 18, 2012 at 7:17 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
anatoly techtonik wrote:So instead of:
How about global \_\_main\_\_ as a boolean?
\_\_name\_\_ == '\_\_main\_\_' as a mark of entrypoint module is coherent and
logical, but awkward to type and requires explicit explaination for
newcomers even with prior background in other langauges.
�if \_\_name\_\_ == '\_\_main\_\_':
� �...
you would have:
�if \_\_main\_\_:
� �...
?
\~Ethan\~
+1
Makes sense....
if \_\_main\_\_:
� � sys.exit(main())