hpyproject / hpy

HPy: a better API for Python

Home Page:https://hpyproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HPyErr_Format missing

mattip opened this issue · comments

It would be nice to have HPyErr_Format with a signature like PyErr_Format

PyErr_Format(PyObject *exception, const char *format, ...);

It is there:

HPyErr_Format(HPyContext *ctx, HPy h_type, const char *fmt, ...);

See also docs.

Ahh, thanks, missed that. Then it should be used in the NumPy port here, I will add it to my PR.

Yes, there may be many locations where it should be used. We introduced it after we started migrating NumPy. I personally always added a TODO and kept the full C API call in a comment and I thought I later fixed all those. Others may not have marked those locations. So, whenever you find one, feel free to migrate and open a PR.