On Thu, Mar 13, 2014 at 8:37 AM, Tres Seaver <tsea...@palladion.com> wrote:
> On 03/12/2014 04:49 PM, Chris Angelico wrote:
>> You can use hasattr() in place of AttributeError
>
> I use:
>
>  getattr(subject, attrname, default)?
>
> *all the time*.

Umm, yeah, that one. Why did I think hasattr was the only way around
that? Anyway, that just means I picked a bad example. There are others
where you have to go for the full try/except.

ChrisA
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to