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

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

内容简介: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]


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

查看所有标签

猜你喜欢:

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

编程之法

编程之法

July / 人民邮电出版社 / 2015-9-1 / 49.00元

本书涉及面试、算法、机器学习三个主题。书中的每道编程题目都给出了多种思路、多种解法,不断优化、逐层递进。本书第1章至第6章分别阐述字符串、数组、树、查找、动态规划、海量数据处理等相关的编程面试题和算法,第7章介绍机器学习的两个算法—K近邻和SVM。此外,每一章都有“举一反三”和“习题”,以便读者及时运用所学的方法解决相似的问题,且在附录中收录了语言、链表、概率等其他题型。书中的每一道题都是面试的高......一起来看看 《编程之法》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试