James Hutchison <jamesghutchi...@gmail.com> added the comment: In the patch:
This: + except AttributeError: + pass should be: + except: <everything inside except statement> Checking for the AttributeError is very slightly slower. Not by a lot, but I think if we're going for speed we might as well be as fast as possible. I can't imagine any other exception coming from that try statement. Using except: pass as opposed to sticking everything inside the except statement is also very slightly slower as well Simple test case, 10 million loops: except: 7.140999794006348 except AttributeError: 7.8440001010894775 Exception code in except: 7.483999967575073 after except/pass: 7.75 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14478> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com