method (a, b = '', *c, **d): gets a syntax error?

Gerrit Holl gerrit at nl.linux.org
Mon Sep 1 06:44:33 EDT 2003


Terry Reedy wrote:
> >>> def f2(**d,): pass
>   File "<stdin>", line 1
>     def f2(**d,): pass
>               ^
> SyntaxError: invalid syntax
> 
> # On the original fixed-pitch font screen, both arrows point at
> offending comma.
> 
> Can someone verify this for 2.3?  If so, there is a bug in either doc
> or interpreter.

Python 2.3 does the same.

Python 2.3 (#1, Aug  5 2003, 14:13:25)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
  0 >>> zip(**(),)
  File "<stdin>", line 1
    zip(**(),)
            ^
SyntaxError: invalid syntax
  1 >>> def foo(**a,): pass
  File "<stdin>", line 1
    def foo(**a,): pass
               ^
SyntaxError: invalid syntax

yours,
Gerrit.

-- 
216. If the patient be a freed man, he receives five shekels.
        -- 1780 BC, Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/





More information about the Python-list mailing list