There are two different visitor implementations in astroid, one in as_string.py and the other in transforms.py, one using the accept method on nodes and the other dispatching on node type. There are also some functions and methods with visitor-like behavior. I think it would be better to have one single visitor that astroid uses internally and since the standard lib ast module has two visitors, ast.NodeVisitor and ast.NodeTransformer, we should have a similar external visitor API.
Originally reported by: BitBucket: ceridwenv, GitHub: ceridwenv
There are two different visitor implementations in astroid, one in as_string.py and the other in transforms.py, one using the accept method on nodes and the other dispatching on node type. There are also some functions and methods with visitor-like behavior. I think it would be better to have one single visitor that astroid uses internally and since the standard lib ast module has two visitors, ast.NodeVisitor and ast.NodeTransformer, we should have a similar external visitor API.