python實現訪問者模式(遞歸方式)

class Node: """ 節點類 """ pass class UnaryOperator(Node): """ 一元操做符類 """ def __init__(self, operand): self.operand = operand class BinaryOperator(Node): """ 二元操做符類 """
相關文章
相關標籤/搜索