hi, I am working with custom NamedTuple classes, and I want to override the constructor. I have been able to successfully override the boxing, unboxing, and typeof by imitating what Numba does for NamedTuples and applying it to my class via the low level extension API (Low-level extension API — Numba 0.55.0.dev0+549.ga25a17e48.dirty-py3.7-linux-x86_64.egg documentation).
In the future I’ll probably migrate to StructRef, but for now this is doing what I need, except that the constructor inside jitted functions is typing the instance as a NamedTuple and not as my custom type.
When I instantiate in interpreted code, it’s ok because I have overridden the type inference for function arguments, but for construction inside jitted function I have not been able to find the Numba internal code that takes care of the typing of the named tuple constructor. I found the lowering in
cpython/tupleobj.py but I cannot find the typing.
Does anyone know where that code is?