def __getattr__(self, name): result = Syntax.__getattr__(self, name) if result is not None: return result # Section からサブシンタックスを全て走査しても見つからなかった場合は # AttributeError を投げる raise AttributeError("'{}' object has no attribute '{}'".format( self.__class__.__name__, name))
def __init__(self, packet, pos=0, parent=None): Syntax.__init__(self, packet, pos, parent) self.callbacks = dict()