diff options
author | Michael Droettboom <mdboom@gmail.com> | 2018-03-20 22:07:08 -0400 |
---|---|---|
committer | Michael Droettboom <mdboom@gmail.com> | 2018-03-30 11:42:56 -0400 |
commit | 2a6565c6432c682c2798e75d48adc587da661822 (patch) | |
tree | 535f247d0b0f00c8b61db6e42ec5fc4768d7cc15 /numpy/doc/misc.py | |
parent | 517f4c0749f83488d25493ccea62b91caa03c2d6 (diff) | |
download | numpy-2a6565c6432c682c2798e75d48adc587da661822.tar.gz |
Return NULL from PyInit_* when exception is raised
I don't think this is documented anywhere, but I'm pretty sure module init
functions should return NULL in order to communicate that an exception
occurred during initialization (as is the standard Python/C API convention).
It's clear from the CPython code
[here](https://github.com/python/cpython/blob/master/Python/importdl.c#L162)
that if you don't return NULL, the exception is swallowed and replaced with the
message "initialization of %s raised unreported exception".
Admittedly, this is only useful for people porting Numpy to new platforms where
it is helpful to know where module initialization is failing, but it can't hurt.
Diffstat (limited to 'numpy/doc/misc.py')
0 files changed, 0 insertions, 0 deletions