keyword.py 1.0 KB

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