On 11 July 2013 20:50, Mark McLoughlin <[email protected]> wrote: > > That answer does begin with this, though: > > I almost always use hasattr: it's the correct choice for most cases.
I have to disagree here, hasattr is basically a timebomb. Three-param getattr, or safe_hasattr are *much* better choices in every case I've seen so far. (safe_hasattr is in extras, or I believe there is a copy in oslo now). -Rob -- Robert Collins <[email protected]> Distinguished Technologist HP Cloud Services _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
