def get_object_name(object):
    """
    Returns given object name.

    :param object: Object to retrieve the name.
    :type object: object
    :return: Object name.
    :rtype: unicode
    """

    if type(object) is property:
        return object.fget.__name__
    elif hasattr(object, "__name__"):
        return object.__name__
    elif hasattr(object, "__class__"):
        return object.__class__.__name__
    else:
        return NULL_OBJECT_NAME
def get_object_name ( object ) : if type ( object ) is property : return object . fget . __name__ elif hasattr ( object , "__name__" ) : return object . __name__ elif hasattr ( object , "__class__" ) : return object . __class__ . __name__ else : return NULL_OBJECT_NAME
Returns given object name.

    :param object: Object to retrieve the name.
    :type object: object
    :return: Object name.
    :rtype: unicode