QScintilla/Lexers/LexerPython.py

changeset 6872
96bb40e987f7
parent 6855
4d80c8cc99a1
child 6873
47804e8cde27
equal deleted inserted replaced
6871:f2be626f4643 6872:96bb40e987f7
204 Public method to get the default keywords. 204 Public method to get the default keywords.
205 205
206 @param kwSet number of the keyword set (integer) 206 @param kwSet number of the keyword set (integer)
207 @return string giving the keywords (string) or None 207 @return string giving the keywords (string) or None
208 """ 208 """
209 return QsciLexerPython.keywords(self, kwSet) 209 if kwSet == 1:
210 if self.language() in ["Python", "Python2"]:
211 keywords = "and as assert break class continue def del elif " \
212 "else except exec finally for from global if " \
213 "import in is lambda not or pass print raise " \
214 "return try while with yield"
215 elif self.language() == "Python3":
216 keywords = "False None True and as assert break class " \
217 "continue def del elif else except finally for " \
218 "from global if import in is lambda nonlocal not " \
219 "or pass raise return try while with yield"
220 else:
221 keywords = QsciLexerPython.keywords(self, kwSet)
222
223 return keywords
210 224
211 def maximumKeywordSet(self): 225 def maximumKeywordSet(self):
212 """ 226 """
213 Public method to get the maximum keyword set. 227 Public method to get the maximum keyword set.
214 228

eric ide

mercurial