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



Op 2006-03-10, Diez B. Roggisch schreef <deets@xxxxxxxxxxxxx>:
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.

You argued that f(,,3) would somehow be hard to figure out.

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.

I didn't claim that the f(,,1) syntax was justified. I asked for an
explanation about why something like f(,,3) would be hard to figure
out.

--
Antoon Pardon
.



Relevant Pages


Loading