[issue1144] parsermodule validation out of sync with Grammar

David Binger report at bugs.python.org
Thu Nov 15 12:46:14 CET 2007


David Binger added the comment:

The one line patch below makes
"import parser; parser.sequence2st(parser.suite("class A(object): 
pass").tolist())"
work.  It puts the parsermodule's validation back in sync
with the Python3 grammar for this rule of the grammar.

This bug is a serious problem for me.

Index: Modules/parsermodule.c
===================================================================
--- Modules/parsermodule.c	(revision 58978)
+++ Modules/parsermodule.c	(working copy)
@@ -992,7 +992,7 @@
     if (res) {
 	if (nch == 7) {
 		res = ((validate_lparen(CHILD(tree, 2)) &&
-			validate_testlist(CHILD(tree, 3)) &&
+			validate_arglist(CHILD(tree, 3)) &&
 			validate_rparen(CHILD(tree, 4))));
 	}
 	else if (nch == 6) {

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1144>
__________________________________


More information about the Python-bugs-list mailing list