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 martin.panter
Recipients martin.panter, mbussonn, r.david.murray, rhettinger, serhiy.storchaka
Date 2017-02-17.21:20:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487366415.83.0.451357806645.issue29593@psf.upfronthosting.co.za>
In-reply-to
Content
Matthias’s proposal sounds reasonable to me. There is a minor disadvantage that it will exceed the width of an 80-character terminal:

UnboundLocalError: local variable 'x' referenced before assignment, or got delet
ed

But I don’t think the wrapping is a big deal; it already happens with longer variable names anyway. I doubt using “unset” instead of “deleted” is any better. If you really wanted to make it clear, you would have to say “or got deleted, perhaps by an exception handler”, but that is probably going too far.

Another idea, which separates the hint from the technical error:

UnboundLocalError: local variable 'x' not set; perhaps it is not yet assigned
History
Date User Action Args
2017-02-17 21:20:15martin.pantersetrecipients: + martin.panter, rhettinger, r.david.murray, serhiy.storchaka, mbussonn
2017-02-17 21:20:15martin.pantersetmessageid: <1487366415.83.0.451357806645.issue29593@psf.upfronthosting.co.za>
2017-02-17 21:20:15martin.panterlinkissue29593 messages
2017-02-17 21:20:15martin.pantercreate