diff options
author | Xuanteng Huang <44627253+xuantengh@users.noreply.github.com> | 2024-10-30 09:01:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 09:01:09 (GMT) |
commit | 35df4eb959b3923c08aaaeff728c5ed1706f31cf (patch) | |
tree | 0066d2a27b47aaa3fc3dde9debcfd9b553579565 /Lib/dis.py | |
parent | 2ab377a47c8290f8bf52c8ffb5d7fc4c45452611 (diff) | |
download | cpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.zip cpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.tar.gz cpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.tar.bz2 |
gh-126072: do not add `None` to `co_consts` if there is no docstring (GH-126101)
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -151,16 +151,17 @@ def distb(tb=None, *, file=None, show_caches=False, adaptive=False, show_offsets # list of CO_* constants. It is also used by pretty_flags to # turn the co_flags field into a human readable list. COMPILER_FLAG_NAMES = { - 1: "OPTIMIZED", - 2: "NEWLOCALS", - 4: "VARARGS", - 8: "VARKEYWORDS", - 16: "NESTED", - 32: "GENERATOR", - 64: "NOFREE", - 128: "COROUTINE", - 256: "ITERABLE_COROUTINE", - 512: "ASYNC_GENERATOR", + 1: "OPTIMIZED", + 2: "NEWLOCALS", + 4: "VARARGS", + 8: "VARKEYWORDS", + 16: "NESTED", + 32: "GENERATOR", + 64: "NOFREE", + 128: "COROUTINE", + 256: "ITERABLE_COROUTINE", + 512: "ASYNC_GENERATOR", + 0x4000000: "HAS_DOCSTRING", } def pretty_flags(flags): |