(object)
return hasattr(tp, "__set__") or hasattr(tp, "__delete__")
Return true if the object is a data descriptor.

    Data descriptors have a __set__ or a __delete__ attribute.  Examples are
    properties (defined in Python) and getsets and members (defined in C).
    Typically, data descriptors will also have __name__ and __doc__ attributes
    (properties, getsets, and members have both of these attributes), but this
    is not guaranteed.
Return true if the object is a data descriptor.
Return true if the object is a data descriptor .
def isdatadescriptor(object):
    """Return true if the object is a data descriptor.

    Data descriptors have a __set__ or a __delete__ attribute.  Examples are
    properties (defined in Python) and getsets and members (defined in C).
    Typically, data descriptors will also have __name__ and __doc__ attributes
    (properties, getsets, and members have both of these attributes), but this
    is not guaranteed."""
    if isclass(object) or ismethod(object) or isfunction(object):
        # mutual exclusion
        return False
    tp = type(object)
    return hasattr(tp, "__set__") or hasattr(tp, "__delete__")
def isdatadescriptor ( object ) : if isclass ( object ) or ismethod ( object ) or isfunction ( object ) : # mutual exclusion return False tp = type ( object ) return hasattr ( tp , "__set__" ) or hasattr ( tp , "__delete__" )