mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
gh-126072: do not add None
to co_consts
if there is no docstring (GH-126101)
This commit is contained in:
parent
2ab377a47c
commit
35df4eb959
16 changed files with 148 additions and 58 deletions
|
@ -56,6 +56,7 @@
|
|||
"CO_OPTIMIZED",
|
||||
"CO_VARARGS",
|
||||
"CO_VARKEYWORDS",
|
||||
"CO_HAS_DOCSTRING",
|
||||
"ClassFoundException",
|
||||
"ClosureVars",
|
||||
"EndOfBlock",
|
||||
|
@ -409,6 +410,7 @@ def iscode(object):
|
|||
co_flags bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
|
||||
| 16=nested | 32=generator | 64=nofree | 128=coroutine
|
||||
| 256=iterable_coroutine | 512=async_generator
|
||||
| 0x4000000=has_docstring
|
||||
co_freevars tuple of names of free variables
|
||||
co_posonlyargcount number of positional only arguments
|
||||
co_kwonlyargcount number of keyword only arguments (not including ** arg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue