This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stars-of-stras
Recipients stars-of-stras
Date 2021-09-26.15:25:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632669913.29.0.580043897174.issue45294@roundup.psfhosted.org>
In-reply-to
Content
Hello,

I have this situation:
----------------
def test():
    
    if True :
        print("Exception"+DiaObjectFactoryHelper)
    else:
        from . import DiaObjectFactoryHelper
        pass
        
test()
---------------
it generates instead of (like the the line 'from . import' is commented) : 
"NameError: name 'DiaObjectFactoryHelper' is not defined"
this:
UnboundLocalError: local variable 'DiaObjectFactoryHelper' referenced before assignment


PS: The github authentificatiion did not work, did not manage to grab email even if set public
History
Date User Action Args
2021-09-26 15:25:13stars-of-strassetrecipients: + stars-of-stras
2021-09-26 15:25:13stars-of-strassetmessageid: <1632669913.29.0.580043897174.issue45294@roundup.psfhosted.org>
2021-09-26 15:25:13stars-of-straslinkissue45294 messages
2021-09-26 15:25:13stars-of-strascreate