class Integer(object):

    def __init__(self, num):
        self.num = num


class Float(object):

    def __init__(self, num):
        self.num = num
expression = Operation('+', Integer('5'), Operation('*', Integer('2'),
    Float('444.1')))
How to write the Visitor Pattern for Abstract Syntax Tree in Python?