Note on PEP 299

Terry Reedy tjreedy at udel.edu
Fri Jul 21 00:48:32 EDT 2006


<bearophileHUGS at lycos.com> wrote in message 
news:1153408904.879310.139640 at m79g2000cwm.googlegroups.com...
>I don't like much the syntax of:
> if __name__ == '__main__':
>
> Some time ago I have read this PEP:
> http://www.python.org/dev/peps/pep-0299/
>
> And why it was refused:
> http://mail.python.org/pipermail/python-dev/2006-March/062955.html
>
> I think the name of the standard main function may be just main(), so
> there isn't the problem with the import (and *maybe* the problem with
> multiple Python versions can be ignored with Python 3.0).

This idea, and a couple of variations, have come up in the Py3 discussions, 
so something might be tried.

tjr






More information about the Python-list mailing list