Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 1 | """Keywords (from "Grammar/python.gram") |
| 2 | |
| 3 | This file is automatically generated; please don't muck it up! |
| 4 | |
| 5 | To update the symbols in this file, 'cd' to the top directory of |
| 6 | the python source tree and run: |
| 7 | |
| 8 | PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \ |
| 9 | Grammar/Grammar \ |
| 10 | Grammar/Tokens \ |
| 11 | Lib/keyword.py |
| 12 | |
| 13 | Alternatively, you can run 'make regen-keyword'. |
| 14 | """ |
| 15 | |
| 16 | __all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"] |
| 17 | |
| 18 | kwlist = [ |
| 19 | 'False', |
| 20 | 'None', |
| 21 | 'True', |
| 22 | '__peg_parser__', |
| 23 | 'and', |
| 24 | 'as', |
| 25 | 'assert', |
| 26 | 'async', |
| 27 | 'await', |
| 28 | 'break', |
| 29 | 'class', |
| 30 | 'continue', |
| 31 | 'def', |
| 32 | 'del', |
| 33 | 'elif', |
| 34 | 'else', |
| 35 | 'except', |
| 36 | 'finally', |
| 37 | 'for', |
| 38 | 'from', |
| 39 | 'global', |
| 40 | 'if', |
| 41 | 'import', |
| 42 | 'in', |
| 43 | 'is', |
| 44 | 'lambda', |
| 45 | 'nonlocal', |
| 46 | 'not', |
| 47 | 'or', |
| 48 | 'pass', |
| 49 | 'raise', |
| 50 | 'return', |
| 51 | 'try', |
| 52 | 'while', |
| 53 | 'with', |
| 54 | 'yield' |
| 55 | ] |
| 56 | |
| 57 | softkwlist = [ |
| 58 | |
| 59 | ] |
| 60 | |
| 61 | iskeyword = frozenset(kwlist).__contains__ |
| 62 | issoftkeyword = frozenset(softkwlist).__contains__ |