Why python doesn't use syntax like function(, , x) for default parameters?

Diez B. Roggisch deets at nospam.web.de
Fri Mar 10 11:05:54 EST 2006


> Those default values are not 0 and <size-of-sequence>, you may have
> only experience with situations where they behave as such but that
> is not the same.

Well, it might be - but the conceptual behavior is (usually) the same. 

> If you need to know these values then you will need to know them
> just as much when a keyword is used or when the default values
> are used later. Calling
> 
>   f(3) or f(arg5=3)
> 
> Will give you no more a clue about the missing default values
> than calling
> 
>   f(,,,,,3)
> 
> At least in the last call you are given a clue about missing
> arguments.

I didn't argue against that  - I don't like the proposal, but I'm pretty
sure that it won't be accepted in any way whatsoever so I don't bother. 

I just wanted to point out that you proclaim false evidence for a similar
situation already being part of python, and that thus the f(,,1) syntax was
justified.

Diez



More information about the Python-list mailing list