pylint-bot / test

0 stars 0 forks source link

Eliminate pattern duplication among visitors and visitor-like methods, add a visitor API #196

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: @ceridwen?


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.