Why python doesn't use syntax like function(, , x) for default parameters?
Diez B. Roggisch
deets at nospam.web.de
Fri Mar 10 08:58:56 EST 2006
Antoon Pardon wrote:
>>
>> Specifying the names of the keyword parameters costs you a little typing
>> once, but saves everybody (including yourself) a lot of grief later when
>> you're trying to figure out what the heck your code does 6 months later.
>
> Could you explain what is so hard in figuring out:
>
> func(,,4)
>
> We sure don't seem to have a problem with figuring out things like
>
> lst[::2]
That is the usual polemics. Its a HUGE difference if I'm supposed to
remember 2 default values that are 0 and <size-of-sequence>, in a
specialized syntax, than arbitrary values
f(,,,,,3)
in some arbitrary function.
Diez
More information about the Python-list
mailing list