This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients ncoghlan, petr.viktorin, xiang.zhang
Date 2016-08-17.07:11:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> The cleanest way to refactor and fix this that comes to mind would be to make static _get_object_name() and _add_methods_to_object() functions in moduleobject.c (which omit any strict type checks), and then call those from PyModule_GetNameObject and PyModule_AddFunctions with the explicit typecheck.

That's one solution. How about loosing PyModule_GetNameObject's constraint? Let it accept non-ModuleType objects? Actually without the constraint of PyModule_GetNameObject, PyModule_AddFunctions can handle non-ModuleType objects.
Date User Action Args
2016-08-17 07:11:00xiang.zhangsetrecipients: + xiang.zhang, ncoghlan, petr.viktorin
2016-08-17 07:11:00xiang.zhangsetmessageid: <>
2016-08-17 07:11:00xiang.zhanglinkissue27782 messages
2016-08-17 07:11:00xiang.zhangcreate