发布于 2017-09-25 23:52:55 | 137 次阅读 | 评论: 0 | 来源: 网友投递
Cython Python的C语言扩展
准确说Cython是单独的一门语言,专门用来写在Python里面import用的扩展库。实际上Cython的语法基本上跟Python一致,而 Cython有专门的“编译器”先将 Cython代码转变成C(自动加入了一大堆的C-Python API),然后使用C编译器编译出最终的Python可调用的模块。
Cython 0.27 发布了。
新特性:
Extension module initialisation follows PEP 489 in CPython 3.5+, which resolves several differences with regard to normal Python modules.
Asynchronous generators (PEP 525) and asynchronous comprehensions (PEP 530) have been implemented.
Variable annotations are now parsed according to PEP 526.
……
bug 修复:
Extension types that were cimported from other Cython modules could disagree about the order of fused cdef methods in their call table.
The exception state handling in generators and coroutines could lead to exceptions in the caller being lost if an exception was raised and handled inside of the coroutine when yielding. (Github issue #1731)
Loops over range(enum)
were not converted into C for-loops.
……
本次更新内容较多,请查看更新日志。
下载地址: