23
23
#define new DEBUG_NEW
24
24
#endif
25
25
26
- // Python 2.6 keywords
26
+ // Python 3.11.4 Keywords
27
+ // (See https://docs.python.org/3/reference/index.html and https://docs.python.org/3/library/index.html)
27
28
static const tchar_t * s_apszPythonKeywordList[] =
28
29
{
29
30
_T (" and" ),
30
31
_T (" as" ),
31
32
_T (" assert" ),
33
+ _T (" async" ),
34
+ _T (" await" ),
32
35
_T (" break" ),
33
36
_T (" class" ),
34
37
_T (" continue" ),
@@ -37,7 +40,6 @@ static const tchar_t * s_apszPythonKeywordList[] =
37
40
_T (" elif" ),
38
41
_T (" else" ),
39
42
_T (" except" ),
40
- _T (" exec" ),
41
43
_T (" finally" ),
42
44
_T (" for" ),
43
45
_T (" from" ),
@@ -47,45 +49,100 @@ static const tchar_t * s_apszPythonKeywordList[] =
47
49
_T (" in" ),
48
50
_T (" is" ),
49
51
_T (" lambda" ),
52
+ _T (" nonlocal" ),
50
53
_T (" not" ),
51
54
_T (" or" ),
52
55
_T (" pass" ),
53
- _T (" print" ),
54
56
_T (" raise" ),
55
57
_T (" return" ),
56
58
_T (" try" ),
57
59
_T (" while" ),
58
- _T (" whith " ),
60
+ _T (" with " ),
59
61
_T (" yield" ),
60
62
};
61
63
62
64
static const tchar_t * s_apszUser1KeywordList[] =
63
65
{
66
+ _T (" ArithmeticError" ),
67
+ _T (" AssertionError" ),
64
68
_T (" AttributeError" ),
69
+ _T (" BaseException" ),
70
+ _T (" BaseExceptionGroup" ),
71
+ _T (" BlockingIOError" ),
72
+ _T (" BrokenPipeError" ),
73
+ _T (" BufferError" ),
74
+ _T (" BytesWarning" ),
75
+ _T (" ChildProcessError" ),
76
+ _T (" ConnectionAbortedError" ),
77
+ _T (" ConnectionError" ),
78
+ _T (" ConnectionRefusedError" ),
79
+ _T (" ConnectionResetError" ),
80
+ _T (" DeprecationWarning" ),
65
81
_T (" EOFError" ),
66
82
_T (" Ellipsis" ),
83
+ _T (" EncodingWarning" ),
84
+ _T (" EnvironmentError" ),
85
+ _T (" Exception" ),
86
+ _T (" ExceptionGroup" ),
67
87
_T (" False" ),
88
+ _T (" FileExistsError" ),
89
+ _T (" FileNotFoundError" ),
90
+ _T (" FloatingPointError" ),
91
+ _T (" FutureWarning" ),
92
+ _T (" GeneratorExit" ),
68
93
_T (" IOError" ),
69
94
_T (" ImportError" ),
95
+ _T (" ImportWarning" ),
96
+ _T (" IndentationError" ),
70
97
_T (" IndexError" ),
98
+ _T (" InterruptedError" ),
99
+ _T (" IsADirectoryError" ),
71
100
_T (" KeyError" ),
72
101
_T (" KeyboardInterrupt" ),
102
+ _T (" LookupError" ),
73
103
_T (" MemoryError" ),
104
+ _T (" ModuleNotFoundError" ),
74
105
_T (" NameError" ),
75
106
_T (" None" ),
107
+ _T (" NotADirectoryError" ),
76
108
_T (" NotImplemented" ),
109
+ _T (" NotImplementedError" ),
110
+ _T (" OSError" ),
77
111
_T (" OverflowError" ),
112
+ _T (" PendingDeprecationWarning" ),
113
+ _T (" PermissionError" ),
114
+ _T (" ProcessLookupError" ),
115
+ _T (" RecursionError" ),
116
+ _T (" ReferenceError" ),
117
+ _T (" ResourceWarning" ),
78
118
_T (" RuntimeError" ),
119
+ _T (" RuntimeWarning" ),
120
+ _T (" StopAsyncIteration" ),
121
+ _T (" StopIteration" ),
79
122
_T (" SyntaxError" ),
123
+ _T (" SyntaxWarning" ),
80
124
_T (" SystemError" ),
81
125
_T (" SystemExit" ),
126
+ _T (" TabError" ),
127
+ _T (" TimeoutError" ),
82
128
_T (" True" ),
83
129
_T (" TypeError" ),
130
+ _T (" UnboundLocalError" ),
131
+ _T (" UnicodeDecodeError" ),
132
+ _T (" UnicodeEncodeError" ),
133
+ _T (" UnicodeError" ),
134
+ _T (" UnicodeTranslateError" ),
135
+ _T (" UnicodeWarning" ),
136
+ _T (" UserWarning" ),
84
137
_T (" ValueError" ),
138
+ _T (" Warning" ),
139
+ _T (" WindowsError" ),
85
140
_T (" ZeroDivisionError" ),
86
141
_T (" __debug__" ),
87
142
_T (" argv" ),
88
143
_T (" builtin_module_names" ),
144
+ _T (" copyright" ),
145
+ _T (" credits" ),
89
146
_T (" exc_traceback" ),
90
147
_T (" exc_type" ),
91
148
_T (" exc_value" ),
@@ -94,10 +151,12 @@ static const tchar_t * s_apszUser1KeywordList[] =
94
151
_T (" last_traceback" ),
95
152
_T (" last_type" ),
96
153
_T (" last_value" ),
154
+ _T (" license" ),
97
155
_T (" modules" ),
98
156
_T (" path" ),
99
157
_T (" ps1" ),
100
158
_T (" ps2" ),
159
+ _T (" quit" ),
101
160
_T (" setprofile" ),
102
161
_T (" settrace" ),
103
162
_T (" stderr" ),
@@ -110,57 +169,209 @@ static const tchar_t * s_apszUser2KeywordList[] =
110
169
{
111
170
_T (" __abs__" ),
112
171
_T (" __add__" ),
172
+ _T (" __aenter__" ),
173
+ _T (" __aexit__" ),
174
+ _T (" __aiter__" ),
113
175
_T (" __and__" ),
176
+ _T (" __anext__" ),
177
+ _T (" __annotations__" ),
178
+ _T (" __await__" ),
114
179
_T (" __bases__" ),
180
+ _T (" __bool__" ),
181
+ _T (" __bytes__" ),
182
+ _T (" __cached__" ),
183
+ _T (" __call__" ),
184
+ _T (" __ceil__" ),
115
185
_T (" __class__" ),
186
+ _T (" __class_getitem__" ),
187
+ _T (" __closure__" ),
116
188
_T (" __cmp__" ),
189
+ _T (" __code__" ),
117
190
_T (" __coerce__" ),
191
+ _T (" __complex__" ),
192
+ _T (" __contains__" ),
193
+ _T (" __defaults__" ),
118
194
_T (" __del__" ),
195
+ _T (" __delattr__" ),
196
+ _T (" __delete__" ),
197
+ _T (" __delitem__" ),
119
198
_T (" __dict__" ),
199
+ _T (" __dir__" ),
120
200
_T (" __div__" ),
121
201
_T (" __divmod__" ),
202
+ _T (" __doc__" ),
203
+ _T (" __enter__" ),
204
+ _T (" __eq__" ),
205
+ _T (" __exit__" ),
206
+ _T (" __file__" ),
122
207
_T (" __float__" ),
123
- _T (" __float__" ),
208
+ _T (" __floor__" ),
209
+ _T (" __floordiv__" ),
210
+ _T (" __format__" ),
211
+ _T (" __ge__" ),
212
+ _T (" __get__" ),
213
+ _T (" __getattr__" ),
214
+ _T (" __getattribute__" ),
124
215
_T (" __getitem__" ),
216
+ _T (" __globals__" ),
217
+ _T (" __gt__" ),
125
218
_T (" __hash__" ),
126
219
_T (" __hex__" ),
220
+ _T (" __iadd__" ),
221
+ _T (" __iand__" ),
222
+ _T (" __ifloordiv__" ),
223
+ _T (" __ilshift__" ),
224
+ _T (" __imatmul__" ),
225
+ _T (" __imod__" ),
226
+ _T (" __import__" ),
227
+ _T (" __imul__" ),
228
+ _T (" __index__" ),
127
229
_T (" __init__" ),
230
+ _T (" __init_subclass__" ),
231
+ _T (" __instancecheck__" ),
128
232
_T (" __int__" ),
129
233
_T (" __invert__" ),
234
+ _T (" __ior__" ),
235
+ _T (" __ipow__" ),
236
+ _T (" __irshift__" ),
237
+ _T (" __isub__" ),
238
+ _T (" __iter__" ),
239
+ _T (" __itruediv__" ),
240
+ _T (" __ixor__" ),
241
+ _T (" __kwdefaults__" ),
242
+ _T (" __le__" ),
130
243
_T (" __len__" ),
244
+ _T (" __length_hint__" ),
245
+ _T (" __loader__" ),
131
246
_T (" __long__" ),
132
247
_T (" __lshift__" ),
248
+ _T (" __lt__" ),
249
+ _T (" __match_args__" ),
250
+ _T (" __matmul__" ),
133
251
_T (" __members__" ),
134
252
_T (" __methods__" ),
253
+ _T (" __missing__" ),
135
254
_T (" __mod__" ),
255
+ _T (" __module__" ),
256
+ _T (" __mro_entries__" ),
136
257
_T (" __mul__" ),
258
+ _T (" __name__" ),
259
+ _T (" __ne__" ),
137
260
_T (" __neg__" ),
261
+ _T (" __new__" ),
262
+ _T (" __next__" ),
138
263
_T (" __nonzero__" ),
139
264
_T (" __oct__" ),
140
265
_T (" __or__" ),
266
+ _T (" __package__" ),
267
+ _T (" __path__" ),
141
268
_T (" __pos__" ),
142
269
_T (" __pow__" ),
270
+ _T (" __qualname__" ),
271
+ _T (" __radd__" ),
272
+ _T (" __rand__" ),
273
+ _T (" __rdivmod__" ),
143
274
_T (" __repr__" ),
275
+ _T (" __reversed__" ),
276
+ _T (" __rfloordiv__" ),
277
+ _T (" __rlshift__" ),
278
+ _T (" __rmatmul__" ),
279
+ _T (" __rmod__" ),
280
+ _T (" __rmul__" ),
281
+ _T (" __ror__" ),
282
+ _T (" __round__" ),
283
+ _T (" __rpow__" ),
284
+ _T (" __rrshift__" ),
144
285
_T (" __rshift__" ),
286
+ _T (" __rsub__" ),
287
+ _T (" __rtruediv__" ),
288
+ _T (" __rxor__" ),
289
+ _T (" __set__" ),
290
+ _T (" __set_name__" ),
291
+ _T (" __setattr__" ),
292
+ _T (" __setitem__" ),
293
+ _T (" __slots__" ),
294
+ _T (" __spec__" ),
145
295
_T (" __str__" ),
146
296
_T (" __sub__" ),
297
+ _T (" __subclasscheck__" ),
298
+ _T (" __truediv__" ),
299
+ _T (" __trunc__" ),
147
300
_T (" __xor__" ),
148
301
_T (" abs" ),
302
+ _T (" aiter" ),
303
+ _T (" all" ),
304
+ _T (" anext" ),
305
+ _T (" any" ),
306
+ _T (" ascii" ),
307
+ _T (" bin" ),
308
+ _T (" bool" ),
309
+ _T (" breakpoint" ),
310
+ _T (" bytearray" ),
311
+ _T (" bytes" ),
312
+ _T (" callable" ),
313
+ _T (" chr" ),
314
+ _T (" classmethod" ),
149
315
_T (" coerce" ),
316
+ _T (" compile" ),
317
+ _T (" complex" ),
318
+ _T (" delattr" ),
319
+ _T (" dict" ),
320
+ _T (" dir" ),
150
321
_T (" divmod" ),
322
+ _T (" enumerate" ),
323
+ _T (" eval" ),
324
+ _T (" exec" ),
325
+ _T (" filter" ),
151
326
_T (" float" ),
152
- _T (" float" ),
327
+ _T (" format" ),
328
+ _T (" frozenset" ),
329
+ _T (" getattr" ),
330
+ _T (" globals" ),
331
+ _T (" hasattr" ),
332
+ _T (" hash" ),
333
+ _T (" help" ),
153
334
_T (" hex" ),
154
335
_T (" id" ),
336
+ _T (" input" ),
155
337
_T (" int" ),
338
+ _T (" isinstance" ),
339
+ _T (" issubclass" ),
340
+ _T (" iter" ),
156
341
_T (" len" ),
342
+ _T (" list" ),
343
+ _T (" locals" ),
157
344
_T (" long" ),
345
+ _T (" map" ),
346
+ _T (" max" ),
347
+ _T (" memoryview" ),
348
+ _T (" min" ),
349
+ _T (" next" ),
158
350
_T (" nonzero" ),
351
+ _T (" object" ),
159
352
_T (" oct" ),
353
+ _T (" open" ),
354
+ _T (" ord" ),
160
355
_T (" pow" ),
356
+ _T (" print" ),
357
+ _T (" property" ),
161
358
_T (" range" ),
359
+ _T (" repr" ),
360
+ _T (" reversed" ),
162
361
_T (" round" ),
362
+ _T (" set" ),
363
+ _T (" setattr" ),
364
+ _T (" slice" ),
365
+ _T (" sorted" ),
366
+ _T (" staticmethod" ),
367
+ _T (" str" ),
368
+ _T (" sum" ),
369
+ _T (" super" ),
370
+ _T (" tuple" ),
371
+ _T (" type" ),
372
+ _T (" vars" ),
163
373
_T (" xrange" ),
374
+ _T (" zip" ),
164
375
};
165
376
166
377
static bool
0 commit comments