Ref: docs for Pkg
I want to compare two methods with the same name from two different packages in the same session/script. To avoid name collision, I would like to negate using
(i.e. "undo" / "reverse"). Something like what detach does for R
.
using PackageOne
some_method()
undo using PackageOne # <-- negate `using PackageOne` without restarting
using PackageTwo
some_method() # name collision avoided here
You cannot detach a package that is already loaded in some module AFAICT. What you can do is wrap your code using these methods in a module like this:
another approach would be: