[Python-ideas] Just main (original) (raw)

Yuval Greenfield ubershmekel at gmail.com
Tue Jun 19 13:27:59 CEST 2012


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. http://www.python.org/dev/**peps/pep-0395/<http://www.python.org/dev/peps/pep-0395/> I agree that python does not need any magic main function. The main boolean is streets ahead in readability though.

Yuval -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120619/c7ad0e6a/attachment.html>



More information about the Python-ideas mailing list