[issue46772] Statically Initialize PyArg_Parser in clinic.py

Eric Snow report at bugs.python.org
Wed Feb 16 13:32:25 EST 2022


New submission from Eric Snow <ericsnowcurrently at gmail.com>:

The code generated by clinic.py is already partially statically initialized.  Currently we init the other fields in Python/getargs.c:parser_init(), which runs the first time we try to use each parser.  AFAICS, that remaining init that could be done statically using the data we have available in clinic.py during code generation.

My primary interest is in static init of PyArg_Parser.kwtuple, which is a tuple containing only strings.

----------
assignee: eric.snow
components: Interpreter Core
messages: 413351
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Statically Initialize PyArg_Parser in clinic.py
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46772>
_______________________________________


More information about the Python-bugs-list mailing list