python实现访问者模式(递归方式)

class Node: """ 节点类 """ pass class UnaryOperator(Node): """ 一元操做符类 """ def __init__(self, operand): self.operand = operand class BinaryOperator(Node): """ 二元操做符类 """
相关文章
相关标签/搜索