def has_text(text):
    """
    Return False if the text is empty or has only spaces.
    
    A true value is returned otherwise.
    """
    # This is faster than "not text.rstrip()" because no new string is
    # built.
    return text and not text.isspace()