I agree with the “don’t do this generally” consensus, but…
The correct answer is:
from importlib import reload
import X
reload(X)
from X import Y # or * for that matter
I agree with the “don’t do this generally” consensus, but…
The correct answer is:
from importlib import reload
import X
reload(X)
from X import Y # or * for that matter