[Python-ideas] Just __main__
alexandre.zani at gmail.com
Tue Jun 19 17:02:37 CEST 2012
-1 on a __main__ function. Seems like unnecessarily confusing magic.
-0 on a __main__ boolean. It just doesn't seem to add much value on
top of __name__ == '__main__'.
On Tue, Jun 19, 2012 at 4:27 AM, Yuval Greenfield <ubershmekel at gmail.com> wrote:
> On Tue, Jun 19, 2012 at 12:41 PM, Simon Sapin <simon.sapin at kozea.fr> wrote:
>> Le 19/06/2012 09:52, anatoly techtonik a écrit :
>>> Here is one more problem - when module is executed as a script, it
>>> loses its __name__, which becomes equal to '__main__'.
>> PEP 395 "Qualified Names for Modules" tries to address this.
> I agree that python does not need any magic __main__ function. The __main__
> boolean is streets ahead in readability though.
> Python-ideas mailing list
> Python-ideas at python.org
More information about the Python-ideas