[Python-checkins]
python/dist/src/Lib/compiler transformer.py, 1.49, 1.50
bcannon at users.sourceforge.net
bcannon at users.sourceforge.net
Sat Apr 9 04:30:18 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/compiler
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10651/Lib/compiler
Modified Files:
transformer.py
Log Message:
Flush out support for ``class B(): pass`` syntax by adding support to the
'parser' module and 'compiler' package.
Closes patch #1176012. Thanks logistix.
Index: transformer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/transformer.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- transformer.py 8 Nov 2004 12:17:34 -0000 1.49
+++ transformer.py 9 Apr 2005 02:30:16 -0000 1.50
@@ -280,12 +280,14 @@
return Lambda(names, defaults, flags, code, lineno=nodelist[1][2])
def classdef(self, nodelist):
- # classdef: 'class' NAME ['(' testlist ')'] ':' suite
+ # classdef: 'class' NAME ['(' [testlist] ')'] ':' suite
name = nodelist[1][1]
doc = self.get_docstring(nodelist[-1])
if nodelist[2][0] == token.COLON:
bases = []
+ elif nodelist[3][0] == token.RPAR:
+ bases = []
else:
bases = self.com_bases(nodelist[3])
More information about the Python-checkins
mailing list