__getattribute__'s error is not available in __getattr__

Jason Maldonis jjmaldonis at gmail.com
Thu May 4 12:05:22 EDT 2017


Thank you Ethan and Chris for the tips. I may be able to adapt that
decorator for my use cases -- I hadn't thought of using something like
that.   Ethan, I'll drop a note over at Python Ideas too with some details
about this.

Thanks for your help,
Jason

On Tue, May 2, 2017 at 9:47 PM, Chris Angelico <rosuav at gmail.com> wrote:

> On Wed, May 3, 2017 at 12:37 PM, Ethan Furman <ethan at stoneleaf.us> 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.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list