[Python-ideas] sys.args
Eric V. Smith
eric at trueblade.com
Fri Jul 26 19:28:08 CEST 2013
On 7/26/2013 11:04 AM, Oleg Broytman wrote:
> 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.
Indeed, I read the subject as "sys.argv", and couldn't figure out what
was being discussed. So at least one person has already fallen victim to
this.
--
Eric.
More information about the Python-ideas
mailing list