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 socketpair
Recipients socketpair
Date 2016-01-29.09:40:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454060426.66.0.838628390922.issue26237@psf.upfronthosting.co.za>
In-reply-to
Content
This works right in Python 2.7, but fails in python3:

UnboundLocalError: local variable 'e' referenced before assignment


def test():
    try:
        raise Exception('a')
    except Exception as e:
        pass
    else:
        return
    print(e)

test()
History
Date User Action Args
2016-01-29 09:40:26socketpairsetrecipients: + socketpair
2016-01-29 09:40:26socketpairsetmessageid: <1454060426.66.0.838628390922.issue26237@psf.upfronthosting.co.za>
2016-01-29 09:40:26socketpairlinkissue26237 messages
2016-01-29 09:40:26socketpaircreate