diff -r f2be626f4643 -r 96bb40e987f7 QScintilla/Lexers/LexerPython.py --- a/QScintilla/Lexers/LexerPython.py Sun Mar 17 12:01:49 2019 +0100 +++ b/QScintilla/Lexers/LexerPython.py Sun Mar 17 12:18:40 2019 +0100 @@ -206,7 +206,21 @@ @param kwSet number of the keyword set (integer) @return string giving the keywords (string) or None """ - return QsciLexerPython.keywords(self, kwSet) + 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" + 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" + else: + keywords = QsciLexerPython.keywords(self, kwSet) + + return keywords def maximumKeywordSet(self): """