Message157965
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 |
|
Date |
User |
Action |
Args |
2012-04-10 17:00:10 | Jimbofbx | set | recipients:
+ Jimbofbx, rhettinger, jcea, pitrou, skrah, python-dev, Ramchandra Apte, Jim.Jewett, serhiy.storchaka |
2012-04-10 17:00:10 | Jimbofbx | set | messageid: <1334077210.31.0.804080673441.issue14478@psf.upfronthosting.co.za> |
2012-04-10 17:00:09 | Jimbofbx | link | issue14478 messages |
2012-04-10 17:00:09 | Jimbofbx | create | |
|