'Return True if the given identifier requires quoting.'

def _requires_quotes(self, value):

    lc_value = value.lower()
    return ((lc_value in self.reserved_words) or (value[0] in self.illegal_initial_characters) or (not self.legal_characters.match(util.text_type(value))) or (lc_value != value))
