mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +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
|
@ -1285,6 +1285,8 @@ compute_code_flags(compiler *c)
|
|||
flags |= CO_VARARGS;
|
||||
if (ste->ste_varkeywords)
|
||||
flags |= CO_VARKEYWORDS;
|
||||
if (ste->ste_has_docstring)
|
||||
flags |= CO_HAS_DOCSTRING;
|
||||
}
|
||||
|
||||
if (ste->ste_coroutine && !ste->ste_generator) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue