Ah OK. So apparently Python's doctest module does work this way, but SymPy's doctester does not. Would it be possible to add an option to make doctests operate in their own module scope? This is IMHO the correct way to write doctests, because then users can just copy and paste the output and it will work (and that's why SymPy's doctester works this way).
Ah OK. So apparently Python's doctest module does work this way, but SymPy's doctester does not. Would it be possible to add an option to make doctests operate in their own module scope? This is IMHO the correct way to write doctests, because then users can just copy and paste the output and it will work (and that's why SymPy's doctester works this way).