diff options
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r-- | Lib/compiler/transformer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py index 0c6d148..dfa25b8 100644 --- a/Lib/compiler/transformer.py +++ b/Lib/compiler/transformer.py @@ -280,12 +280,14 @@ class Transformer: 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]) |