Menu

#273 Parse error on two-arg lambda as default argument

v3.0
open
nobody
5
2008-04-09
2008-04-09
No

If I run Epydoc 3.0.1 on the following program:

def f(g = lambda x, y: None):
pass

I get this error:

| Source code parsing failed (but introspection was successful).
| Error: Error during parsing: invalid syntax (/home/huurnem/tmp/epydoc/testcase.py, line 1) -- Bad argument list

This problem only occurs if the lambda expression has more than one argument, so probably the comma after the "x" is seen as the start of a new argument of "f", while it is the start of a new argument of the lambda expression.

Discussion


Log in to post a comment.