Martin Panter added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29593>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to