Wrapping templated objects elegantly in Cython
问题 This is similar to this question, but it never got any solutions, and I have at least a workaround for the problem, as inelegant as it is. I am trying to wrap a templated class, Point<_T,__Scale> , where _T=int,float... and __Scale is an int. Now the compiler will generate a separate class for each template value used, but the classes are not related in any way. However, the classes share all their methods, mostly operator overloads for !=<>*&/| , and getters. In Cython, the only way I have