[New-bugs-announce] [issue44099] Introduce a new slot in PyModuleDef to hold the classes

Shreyan Avigyan report at bugs.python.org
Mon May 10 05:49:59 EDT 2021


New submission from Shreyan Avigyan <shreyan.avigyan at gmail.com>:

It's tedious to add classes one by one using PyModule_AddObject in PyInit_module function. Wouldn't it be much easier if there's a slot that has an array of all the classes in their PyObject form and it'll automatically add those classes. Since this is a backwards compatibility change it'll be best if a macro (like PY_AUTO_OBJECT maybe?) is defined then it'll add those classes automatically. If the slot is NULL or 0 then don't add anything. But yeah they may add more classes if they want but it doesn't matter much.

Thanking you,

With Regards,
Shreyan Avigyan

----------
components: C API, Extension Modules
messages: 393374
nosy: shreyanavigyan
priority: normal
severity: normal
status: open
title: Introduce a new slot in PyModuleDef to hold the classes
type: enhancement

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


More information about the New-bugs-announce mailing list