'dispatcher on node\'s class/bases name.'

def visit(self, node):

    cls = node.__class__
    try:
        visitmethod = self.cache[cls]
    except KeyError:
        for subclass in cls.__mro__:
            visitmethod = getattr(self, subclass.__name__, None)
            if (visitmethod is not None):
                break
        else:
            visitmethod = self.__object
        self.cache[cls] = visitmethod
    visitmethod(node)
