Cython 0.27 发布,Python 的 C 语言扩展

栏目: 软件资讯 · 发布时间: 6年前

内容简介:Cython 0.27 发布了。准确说Cython是单独的一门语言,专门用来写在Python里面import用的扩展库。实际上Cython的语法基本上跟Python一致,而 Cython有专门的“编译器”先将 Cython代码转变成C(自动加入...

Cython 0.27 发布了。准确说Cython是单独的一门语言,专门用来写在 Python 里面import用的扩展库。实际上Cython的语法基本上跟Python一致,而 Cython有专门的“编译器”先将 Cython代码转变成C(自动加入了一大堆的C-Python API),然后使用C编译器编译出最终的Python可调用的模块。

新特性:

  • 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. 

  • ……

本次更新内容较多,请查看更新日志

下载地址:


【声明】文章转载自:开源中国社区 [http://www.oschina.net]


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

未来世界的幸存者

未来世界的幸存者

阮一峰 / 人民邮电出版社 / 2018-6-1 / 39.00 元

本书为阮一峰博客文集,主要收录的是作者对技术变革的影响的一些思考,希望能够藉此书让读者意识到世界正在剧烈变化,洪水就在不远处,从而早早准备出路。本书适合所有乐于思考的读者。一起来看看 《未来世界的幸存者》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具