[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before
New submission from arts stars : Hello, I have this situation: def test(): if True : print("Exception"+DiaObjectFactoryHelper) else: from . import DiaObjectFactoryHelper pass test() --- it generates instead of
[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before
arts stars added the comment: It is not for debuging my code. your answer is really middleclass sorry to say that. you admit its a due the undefined name of var DiaObjectFactoryHelper that is exactly I wanted to point out. I solved my issue not having answer like in the FAQ like you simply