[Python-ideas] sys.args
Oleg Broytman
phd at phdru.name
Fri Jul 26 17:04:05 CEST 2013
On Fri, Jul 26, 2013 at 05:55:49PM +0300, Michael Foord <fuzzyman at gmail.com> wrote:
> On 26 July 2013 17:52, Oleg Broytman <phd at phdru.name> wrote:
>
> > On Fri, Jul 26, 2013 at 05:39:18PM +0300, anatoly techtonik <
> > techtonik at gmail.com> wrote:
> > > sys.argv is an atavism with not intuitive name, how about sys.args for
> > > program arguments only?
> > >
> > > if not sys.args:
> > > print("usage: ...")
> >
> > 1. How are you going to handle backward compatibility? I.e., how are you
> > going to fix millions scripts out there?
> >
> >
> How will adding another sys attribute break those scripts?
Adding another way to access sys.argv without removing argv itself
would lead to major confusion; "args" is too similar to "argv", the
difference is one letter in spelling and one index in accessing.
And removing sys.argv is a major compatibility problem.
Oleg.
--
Oleg Broytman http://phdru.name/ phd at phdru.name
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas
mailing list