Using a shared self.symbols seems dangerous to me. What kind of code will be generated after
from math import *
from bisect import *

as the same self.symbols is used, I fear the resulting code will be wrong.