File: consts.py

package info (click to toggle)
pypy3 7.3.19%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,236 kB
  • sloc: python: 2,098,316; ansic: 540,565; sh: 21,462; asm: 14,419; cpp: 4,451; makefile: 4,209; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 12; awk: 4
file content (51 lines) | stat: -rw-r--r-- 1,575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
Various flags used during the compilation process.
"""

CO_OPTIMIZED = 0x0001
CO_NEWLOCALS = 0x0002
CO_VARARGS = 0x0004
CO_VARKEYWORDS = 0x0008
CO_NESTED = 0x0010
CO_GENERATOR = 0x0020
CO_NOFREE = 0x0040
CO_COROUTINE = 0x0080
CO_ITERABLE_COROUTINE = 0x0100    # set by @types.coroutine
CO_ASYNC_GENERATOR = 0x0200
CO_GENERATOR_ALLOWED = 0x1000
CO_FUTURE_DIVISION = 0x20000
CO_FUTURE_ABSOLUTE_IMPORT = 0x40000
CO_FUTURE_WITH_STATEMENT = 0x80000
CO_FUTURE_PRINT_FUNCTION = 0x100000
CO_FUTURE_UNICODE_LITERALS = 0x200000
CO_FUTURE_BARRY_AS_BDFL = 0x400000
CO_FUTURE_GENERATOR_STOP = 0x800000
CO_FUTURE_ANNOTATIONS     = 0x1000000  # annotations become strings at runtime

#pypy specific:
CO_KILL_DOCSTRING = 0x2000000
CO_YIELD_INSIDE_TRY = 0x4000000

PyCF_MASK = (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT |
             CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION |
             CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL |
             CO_FUTURE_GENERATOR_STOP | CO_FUTURE_ANNOTATIONS)
PyCF_SOURCE_IS_UTF8 = 0x0100
PyCF_DONT_IMPLY_DEDENT = 0x0200
PyCF_ONLY_AST = 0x0400
PyCF_IGNORE_COOKIE = 0x0800
PyCF_ASYNC_HACKS = 0x1000
PyCF_ALLOW_INCOMPLETE_INPUT = 0x4000
PyCF_ACCEPT_NULL_BYTES = 0x10000000   # PyPy only, for compile()
PyCF_FOUND_ENCODING = 0x20000000      # PyPy only, for pytokenizer
PyCF_TYPE_COMMENTS = 0x40000000
PyCF_ALLOW_TOP_LEVEL_AWAIT = 0x2000

# Masks and values used by FORMAT_VALUE opcode
FVC_MASK      = 0x3
FVC_NONE      = 0x0
FVC_STR       = 0x1
FVC_REPR      = 0x2
FVC_ASCII     = 0x3
FVS_MASK      = 0x4
FVS_HAVE_SPEC = 0x4