Terry J. Reedy <tjre...@udel.edu> added the comment: -1 as I understand the proposal. Your code is bugged and should fail as soon as possible.
If I understand correctly, you agree that the SyntaxError is correct as the language is currently defined, but you want the definition changed. It is not clear if you only want implicit deletes at the end of except clauses to work or if you only want explicit deletes to work. If the latter, you want def f(): e = 1 del e def g(): print(e) return g to compile. I would not. Your reason "After all, the "variable referenced" has no value before it is set," (duh, right) makes no sense to me in this context. g must have a valid value of e to run. So you seem to be suggesting that detection of buggy code should be delayed. ---------- nosy: +tjreedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4617> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com