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.