Re: [Python-Dev] unittest argv

2006-05-01 Thread Guido van Rossum
On 5/1/06, John Keyes <[EMAIL PROTECTED]> wrote: > > No. Late binding of sys.argv is very important. There are plenty of > > uses where sys.argv is dynamically modified. > > Can you explain this some more? If it all happens in the same > function call so how can it be late binding? You seem to be

Re: [Python-Dev] unittest argv

2006-05-01 Thread John Keyes
On 5/1/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 5/1/06, John Keyes <[EMAIL PROTECTED]> wrote: > > On 5/1/06, Guido van Rossum <[EMAIL PROTECTED]> 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? > > >

Re: [Python-Dev] unittest argv

2006-05-01 Thread Phillip J. Eby
At 06:11 PM 5/1/2006 +0100, John Keyes wrote: >On 5/1/06, Guido van Rossum <[EMAIL PROTECTED]> 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

Re: [Python-Dev] unittest argv

2006-05-01 Thread Guido van Rossum
On 5/1/06, John Keyes <[EMAIL PROTECTED]> wrote: > On 5/1/06, Guido van Rossum <[EMAIL PROTECTED]> 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 > a

Re: [Python-Dev] unittest argv

2006-05-01 Thread John Keyes
On 5/1/06, Guido van Rossum <[EMAIL PROTECTED]> 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 thi

Re: [Python-Dev] unittest argv

2006-05-01 Thread Guido van Rossum
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? On 4/30/06, John Keyes <[EMAIL PROTECTED]> wrote: > Hi, > > main() in unittest has an optional parameter called argv. If it is not > present in the invocation, it defaults to None.

[Python-Dev] unittest argv

2006-04-30 Thread John Keyes
Hi, main() in unittest has an optional parameter called argv. If it is not present in the invocation, it defaults to None. Later in the function a check is made to see if argv is None and if so sets it to sys.argv. I think the default should be changed to sys.argv[1:] (i.e. the command line argu