diff -r 47804e8cde27 -r 5a3a39442711 QScintilla/Lexers/LexerPython.py --- a/QScintilla/Lexers/LexerPython.py Sun Mar 17 14:12:00 2019 +0100 +++ b/QScintilla/Lexers/LexerPython.py Sun Mar 17 18:43:46 2019 +0100 @@ -34,6 +34,11 @@ self.variant = variant self.commentString = "#" + self.keywordSetDescriptions = [ + self.tr("Keywords"), + self.tr("Highlighted identifiers"), + ] + ############################################################## ## default sub-style definitions ############################################################## @@ -219,15 +224,16 @@ """ if kwSet == 1: if self.language() in ["Python", "Python2"]: - keywords = "and as assert break class continue def del elif " \ - "else except exec finally for from global if " \ - "import in is lambda not or pass print raise " \ - "return try while with yield" + keywords = ("and as assert break class continue def del elif " + "else except exec finally for from global if " + "import in is lambda not or pass print raise " + "return try while with yield cdef cimport cpdef") elif self.language() == "Python3": - keywords = "False None True and as assert break class " \ - "continue def del elif else except finally for " \ - "from global if import in is lambda nonlocal not " \ - "or pass raise return try while with yield" + keywords = ("False None True and as assert break class " + "continue def del elif else except finally for " + "from global if import in is lambda nonlocal not " + "or pass raise return try while with yield cdef " + "cimport cpdef") else: keywords = QsciLexerPython.keywords(self, kwSet)