[Python-Dev] PEP 463: Exception-catching expressions
rosuav at gmail.com
Sat Feb 22 12:44:06 CET 2014
On Sat, Feb 22, 2014 at 10:27 PM, Antoine Pitrou <solipsis at 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.
More information about the Python-Dev