[Python-bugs-list] [Bug #125375] parser.tuple2ast() failure on valid parse tree

noreply@sourceforge.net noreply@sourceforge.net
Mon, 11 Dec 2000 14:13:17 -0800


Bug #125375, was updated on 2000-Dec-11 12:04
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Submitted by: jepler
Assigned to : fdrake
Summary: parser.tuple2ast() failure on valid parse tree

Details: parser.tuple2ast() fails on the parse tree produced for
function definitions which include "*args, **kw" or "*args, * *kw"

Versions 1.5.2, 2.0

Python 1.5.2 (#1, Sep 17 1999, 20:15:36)  [GCC egcs-2.91.66 19990314/Linux (egcs
- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import parser
>>> parser.tuple2ast(parser.expr("lambda x, *y, **z: 0").totuple())
Traceback (innermost last):
  File "<stdin>", line 1, in ?
parser.ParserError: Expected node type 16, got 36.


Follow-Ups:

Date: 2000-Dec-11 14:13
By: fdrake

Comment:
Fixed in Modules/parsermodule.c revision 2.59.  Added appropriate test cases to the regression test to avoid re-introducing problems in validate_varargslist().
-------------------------------------------------------

Date: 2000-Dec-11 12:35
By: fdrake

Comment:
This appears to be a bug in the validation of argument lists.  This is not, however, a bug in the code parser/compiler code, so I'm re-labelling it as a "Modules" bug.

Assigned to me since I wrote the code.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=125375&group_id=5470