> Also "argv" sounds more low-level than something like "arguments".

While we're on the subject of argv, I've been wondering
whether py3k might want to revisit the idea of having
argv[0] be the program name. In my experience, one almost
*never* wants to treat argv[0] the same way as the rest of
the arguments.

Putting the program name into argv[0] is a neat
trick in C that's relatively harmless, because it's
just as easy to start iterating from 1 than 0, but
in Python it makes all argument-processing code
more complicated than necessary.

It also provides a nasty trap for the unwary, as I
discovered one day when I wrote a program for deleting
files that deleted itself the first time I ran it. :-)

Changing the existing behaviour of argv would probably
be too disruptive, so how about relegating argv to a
low-level detail and providing something else for
everyday use that omits argv[0]?

sys.arguments would sound quite nice for that.

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to