3 ms·
FWIW you could have done this in far fewer lines of python using a code generator like Cython or Pyrex. that said, learning the intricacies of an extension - a
by jnazario 14y ago
FWIW you could have done this in far fewer lines of python using a code generator like Cython or Pyrex.
that said, learning the intricacies of an extension - and all of the stuff you have to do under the hood like registering handlers, reference counting, cleanup, etc - is a valuable experience.
but once you got that done i just recommend you use code generators. it's also a lot easier to maintain.