Message338498
Actually I just see that this behavior of PyImport_GetModule() is documented:
"Return the already imported module with the given name. If the module has not been imported yet then returns NULL but does not set an error. Returns NULL and sets an error if the lookup failed."
New in version 3.7.
So it should indeed be just a matter of always checking for PyErr_Occurred(). |
|
Date |
User |
Action |
Args |
2019-03-20 17:10:35 | skrah | set | recipients:
+ skrah, brett.cannon, ncoghlan, eric.snow, remi.lapeyre, asmeurer, xtreak |
2019-03-20 17:10:35 | skrah | set | messageid: <1553101835.28.0.651097017695.issue36370@roundup.psfhosted.org> |
2019-03-20 17:10:35 | skrah | link | issue36370 messages |
2019-03-20 17:10:35 | skrah | create | |
|