def _is_descriptor(obj):
 return (hasattr(obj, '__get__') or hasattr(obj, '__set__') or hasattr(obj, '__delete__'))

def _is_descriptor ( obj ) : return ( hasattr ( obj , '__get__' ) or hasattr ( obj , '__set__' ) or hasattr ( obj , '__delete__' ) )
returns true if obj is a descriptor .