[New-bugs-announce] [issue45482] [C API] Add PySimpleNamespace_New() function

STINNER Victor report at bugs.python.org
Fri Oct 15 04:00:51 EDT 2021


New submission from STINNER Victor <vstinner at python.org>:

Python has a types.SimpleNamespace type which is convenient to cheap a "simple namespace". I propose to make its C API public (but exclude it from the limited C API): add PySimpleNamespace_New() function.

It's currently used in:

* Modules/timemodule.c: time.get_clock_info(name)
* Python/sysmodule.c: sys.implementation

It's also used in:

* Python/import.c: _PyImport_BootstrapImp()
* Modules/_testmultiphase.c: createfunc_nonmodule() used as the Py_mod_create slot

----------
components: C API
messages: 403984
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Add PySimpleNamespace_New() function
versions: Python 3.11

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


More information about the New-bugs-announce mailing list