[Python-Dev] Requesting pronouncement on PEP 463: Exception-catching expressions
Tres Seaver
tseaver at palladion.com
Wed Mar 12 22:37:49 CET 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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*.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlMg060ACgkQ+gerLs4ltQ70IgCgi2HFt1DRWHaeIlwgjyf1UJiR
1uEAn0+pf2fS+USmesmXtV9O63jA93hq
=fLq7
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list