GSoC Week #10
Last week I merged the pure Python decorator changes into my “integration branch”, then the hudson tests revealed some minor problem, and finally I got them fixed.
I also started to think about annotation support. To export the __annotations__ slot, there is a Python C-API PyFunction_SetAnnotations. However, apparently this API is for PyFunction, but Cython compiled functions are PyCFunction. Thus, to export this slot, we have to somehow extend and customize the PyCFunction type, just like what has been done in Cython for binding method. However so far it seems it is not worth the effort to have a customized type just for exporting annotation. Thus, turning annotations to argument typing would have higher priority and I’ll head to that.
Turning annotations to typing information should not be hard. Before actually to do this, I refactored the DefNode a bit and got the issue #477 fixed. Since the @cython.locals is actually similar to the typing annotations, it would be then easier to get it done.
Leave a Comment
Be the first to comment!