const.py 434 B

123456789101112131415161718192021
  1. import enum
  2. import sys
  3. PY38 = sys.version_info[:2] == (3, 8)
  4. PY37_PLUS = sys.version_info >= (3, 7)
  5. PY38_PLUS = sys.version_info >= (3, 8)
  6. PY39_PLUS = sys.version_info >= (3, 9)
  7. PY310_PLUS = sys.version_info >= (3, 10)
  8. BUILTINS = "builtins" # TODO Remove in 2.8
  9. class Context(enum.Enum):
  10. Load = 1
  11. Store = 2
  12. Del = 3
  13. # TODO Remove in 3.0 in favor of Context
  14. Load = Context.Load
  15. Store = Context.Store
  16. Del = Context.Del