[Python-ideas] About calling syntax

Bruce Leban bruce at leapyear.org
Wed Sep 10 17:24:12 CEST 2008

On Tue, Sep 9, 2008 at 11:22 PM, Zaur Shibzoukhov <szport at gmail.com> wrote:

> in call: foo(x=2,y=3, a,b,c)
>        args = [a,b,c] and kw = {'x':2, 'y':3}
> in call: foo(a,b,c, x=2, y=3)
>        args = [a,b,c] and kw = {'x':2, 'y':3} too.
> It's just simmetrical form of calling syntax.

But why should you be forced to separate them like that. Why not

    args = [a,b,c] and kw = {'x':2, 'y':3, 'z':4}

I'm sure there are scenarios where this is useful but I think in general it
would be less readable. As it is, I can't miss a positional argument in the
middle of a long list of keyword arguments:


--- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20080910/748471d2/attachment.html>

More information about the Python-ideas mailing list