On Sat, Feb 22, 2014 at 10:27 PM, Antoine Pitrou <solip...@pitrou.net> wrote:
> Yeah, none of these examples makes a convincing case that hasattr() is
> useless, IMO.

I'm not trying to make the case that it's useless. I'm trying to show
that, if it didn't exist, all of these would be written some other
way, and the case for its creation would not be terribly strong. It's
definitely of value (and as you've shown in some of those cases, its
proper use can narrow the exception-catching scope - a good thing),
but not enough to be worth blessing with a built-in function.

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