mirror of
https://github.com/python/cpython.git
synced 2024-11-25 02:44:06 +08:00
Fix bootstrapping asdl -- it didn't work with Python 2.7.
This commit is contained in:
parent
667f545e03
commit
416b516d46
@ -112,7 +112,7 @@ class Product(AST):
|
||||
# interesting node.
|
||||
# We also define a Check visitor that makes sure the parsed ASDL is well-formed.
|
||||
|
||||
class VisitorBase:
|
||||
class VisitorBase(object):
|
||||
"""Generic tree visitor for ASTs."""
|
||||
def __init__(self):
|
||||
self.cache = {}
|
||||
@ -137,7 +137,7 @@ class Check(VisitorBase):
|
||||
Errors are printed and accumulated.
|
||||
"""
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
super(Check, self).__init__()
|
||||
self.cons = {}
|
||||
self.errors = 0
|
||||
self.types = {}
|
||||
|
Loading…
Reference in New Issue
Block a user