[Python-ideas] Just __main__
Ethan Furman
ethan at stoneleaf.us
Mon Jun 18 18:17:05 CEST 2012
anatoly techtonik wrote:
> 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.
So instead of:
if __name__ == '__main__':
...
you would have:
if __main__:
...
?
~Ethan~
More information about the Python-ideas
mailing list