[Python-Dev] What about PEP 299?
Guido van Rossum
guido at python.org
Wed Mar 29 01:06:57 CEST 2006
OK. -1 on PEP 299 it is.
On 3/28/06, Charles Cazabon <python at discworld.dyndns.org> wrote:
> Guido van Rossum <guido at python.org> wrote:
> > On 3/28/06, Charles Cazabon <python at discworld.dyndns.org> wrote:
> > > 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`.
> >
> > You can do "python -m somemodule" as long as somemodule.py uses the if
> > __name__=='__main__' convention. What does your proposal add?
>
> Well, it's not really my proposal. I'm just suggesting the behaviour in
> PEP299 could be added via a commandline option so that it doesn't introduce
> backward-incompatibility.
>
> I don't see any particular benefit to PEP299 myself -- I'd rather just add an
> entry to the style guide about standardizing the "executable stanza" and main() function.
>
> Charles
> --
> -----------------------------------------------------------------------
> Charles Cazabon <python at discworld.dyndns.org>
> GPL'ed software available at: http://pyropus.ca/software/
> -----------------------------------------------------------------------
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list