[Python-Dev] unittest argv

Phillip J. Eby pje at telecommunity.com
Mon May 1 19:26:42 CEST 2006


At 06:11 PM 5/1/2006 +0100, John Keyes wrote:
>On 5/1/06, Guido van Rossum <guido at python.org> wrote:
> > Wouldn't this be an incompatible change? That would make it a no-no.
> > Providing a dummy argv[0] isn't so hard is it?
>
>It would be incompatible with existing code, but that code is
>already broken (IMO) by passing a dummy argv[0].  I don't
>think fixing it would affect much code, because normally
>people don't specify the '-q' or '-v' in code, it is almost
>exclusively used on the command line.

Speak for yourself - I have at least two tools that would have to change 
for this, at least one of which would have to grow version testing code, 
since it's distributed for Python 2.3 and up.  That's far more wasteful 
than providing an argv[0], which is already a common requirement for main 
program functions in Python.



More information about the Python-Dev mailing list