On Wed, May 3, 2017 at 2:39 PM, Ethan Furman <et...@stoneleaf.us> wrote: > On 05/02/2017 07:47 PM, Chris Angelico wrote: >> >> On Wed, May 3, 2017 at 12:37 PM, Ethan Furman wrote: > > >>> Until then Chris' decorator is probably the easiest work around -- but >>> you >>> should only catch AttributeError, not everything. >> >> >> It does. (Or rather, it catches only those exception(s) listed as >> parameters.) Any other exceptions pass through unchanged. > > > Ah, that's what I get for skimming!
I was going to hardcode AttributeError, which would have made it more obvious and simpler, but then a single-purpose decorator (and if you do that, why not just wrap your code in try/except manually?). Obviously for production it needs a codstring... ChrisA -- https://mail.python.org/mailman/listinfo/python-list