Stefan Behnel added the comment: I mentioned it in a couple of places during the discussion, you might just have missed them.
The code that generates the unpacking C code starts here: https://github.com/cython/cython/blob/4ebc647c2fa54179d25335b2dcf5d845e7fc9a79/Cython/Compiler/Nodes.py#L3068 and extends to here: https://github.com/cython/cython/blob/4ebc647c2fa54179d25335b2dcf5d845e7fc9a79/Cython/Compiler/Nodes.py#L3641 As I said, Cython actually takes its signature information from normal Python signatures, which you can augment with type annotations in normal C style. So it's not really some fancy DSL behind it, just straight forward stuff like this: def func(a, int b, bytes c, unicode s, *, bint flag=False): ... If you want to take a closer look, it's best to just write down a Python function and let Cython translate it for you to see the code that it generates for it. And it's based on Cython's type system, so argument type conversions use Cython's support for things like copying mappings into structs, for example, or optimised builtin types unboxing. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16612> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com