Sometimes, in classes, it's useful to have a static attribute such as the following:
namespace mynamespace { class myClass { public: static void myStaticMethod (void); }; }
In Cython, there is no support for this via a static
keyword, but what you can do is tie this function to a namespace so that it becomes the following:
cdef extern from "header.h" namespace "mynamespace::myClass": void myStaticMethod ()
Now, you simply call this method as a global method in Cython.