New submission from Antoine Pitrou: Attached patch adds PyState_GetModuleAttr() and converts the _csv module to use it (as an example).
As you can see, the _csv module grows a little but it now has proper error handling (previously, it didn't check for PyState_FindModule() returning NULL). (A few lines would be removed if we added PyErr_FormatV as well...) ---------- components: Extension Modules, Interpreter Core files: getmodattr.patch keywords: patch messages: 194949 nosy: eli.bendersky, loewis, ncoghlan, pitrou priority: normal severity: normal stage: patch review status: open title: Add PyState_GetModuleAttr type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31244/getmodattr.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com