[Python-3000] PEP 3102 question

Guido van Rossum guido at python.org
Wed Apr 2 02:14:26 CEST 2008


On Mon, Mar 31, 2008 at 12:12 PM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> Do I understand correctly that with PEP 3102 implemented, keyword
>  arguments can follow vararg in function definitions, but doing the
>  same when calling the function is still a syntax error?
>
>  With the latest py3k,
>
>  >>> def f(a, *args, v=None):
>  ...    pass
>  ...
>  >>> f(a, *args, v=None)
>   File "<stdin>", line 1
>     f(a, *args, v=None)
>                 ^
>  SyntaxError: invalid syntax
>
>  Is this intentional?

Yes, in the sense that the PEP doesn't propose to fix this.

Thomas Wouters's changes for variable tuple packing might fix this, if
we can agree to add that feature.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list