@staticmethod
def _getattr_property(obj, attrname):
    """Property-aware getattr to use in object finding.

        If attrname represents a property, return it unevaluated (in case it has
        side effects or raises an error.

        """
    if not isinstance(obj, type):
        try:
            attr = getattr(type(obj), attrname)
        except AttributeError:
            pass
        else:
            if isinstance(attr, property):
                return attr
    return getattr(obj, attrname)
