Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 3/28/06, Georg Brandl <[EMAIL PROTECTED]> wrote: > > since I found myself writing "if __name__ == '__main__'" > > often these days, I wondered whether PEP 299 could be pronounced > > upon. I'm not proposing putting it into 2.5, but it should be > > relatively small a change. > > If you're asking for a quick pronouncement, it's going to be "no". > It's not worth the change (in docs, user habits, etc.) and there's > nothing particularly broken.
It might be worth instead adding an option flag to the executable that implies "from the loaded module, run __main__() with sys.argv as its argument(s)", so the user can get this behaviour with `python -X somemodule.py`. Charles -- ----------------------------------------------------------------------- Charles Cazabon <[EMAIL PROTECTED]> GPL'ed software available at: http://pyropus.ca/software/ ----------------------------------------------------------------------- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com