Barry A. Warsaw added the comment: Ezio, the problem with your patch is that it also gives a warning on this code, which is totally safe:
def good(): exc = None try: bar(int(sys.argv[1])) except KeyError as e: print('ke') exc = e except ValueError as e: print('ve') exc = e print(exc) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17792> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com