[Python-Dev] Module properties for C modules

Christian Heimes lists at cheimes.de
Wed Apr 30 23:32:57 CEST 2008


Benjamin Peterson schrieb:
> Good idea. Perhaps eventually they could be extended to Python, but
> they are definitely useful in C now. How about passing a list of
> getsets to PyImport_InitModule(5)?

Yeah, I've a similar idea with PyImport_InitModule5() and a list of
structs containing name, getter, setter, deleter, docstring. The module
struct has to gain an additional slot which may contain a dict of names
-> propertyobjects.

Christian


More information about the Python-Dev mailing list