[Python-checkins] python/dist/src/Grammar Grammar,1.52,1.53

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Sat Mar 5 07:47:58 CET 2005


Update of /cvsroot/python/python/dist/src/Grammar
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30194/Grammar

Modified Files:
	Grammar 
Log Message:
Allow classes to be defined with empty parentheses.  This means that
``class C(): pass`` is no longer a syntax error.


Index: Grammar
===================================================================
RCS file: /cvsroot/python/python/dist/src/Grammar/Grammar,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- Grammar	31 Aug 2004 10:07:00 -0000	1.52
+++ Grammar	5 Mar 2005 06:47:56 -0000	1.53
@@ -99,7 +99,7 @@
 testlist_safe: test [(',' test)+ [',']]
 dictmaker: test ':' test (',' test ':' test)* [',']
 
-classdef: 'class' NAME ['(' testlist ')'] ':' suite
+classdef: 'class' NAME ['(' [testlist] ')'] ':' suite
 
 arglist: (argument ',')* (argument [',']| '*' test [',' '**' test] | '**' test)
 argument: [test '='] test [gen_for] # Really [keyword '='] test



More information about the Python-checkins mailing list