David Binger added the comment:

Okay, here is the whole thing with a unittest that exposes the problem.

Index: Lib/test/test_parser.py
===================================================================
--- Lib/test/test_parser.py     (revision 58984)
+++ Lib/test/test_parser.py     (working copy)
@@ -136,6 +136,7 @@
 
     def test_class_defs(self):
         self.check_suite("class foo():pass")
+        self.check_suite("class foo(object):pass")
 
     def test_import_from_statement(self):
         self.check_suite("from sys.path import *")
Index: Modules/parsermodule.c
===================================================================
--- Modules/parsermodule.c      (revision 58984)
+++ 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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1144>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to