Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced content levelIntermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
760
|
24 章 擴充與內嵌標準型的 Python
Cython
Cython
http://cython.org/
)語言,Greg Ewing pyrex
http://www.cosc.
canterbury.ac.nz/greg.ewing/python/Pyrex/
)的一個「友善分支(friendly
fork)」,通常是為 Python 撰寫擴充功能最便利的方式。Cython 幾乎是
Python 的一個完整子集(它們宣稱的目標是最終成為 Python 的一個完整的
超集合
1
,為變數加上選擇性的類似 C 的型別:你可以自動將 Cython 程式
(帶有延伸檔名
.pyx
)編譯為機器碼(藉由產生 C 程式碼的中間步驟)
產生 Python 可匯入的擴充功能。)請參閱前面的 URL 來查看深入、詳盡、
優良的說明文件,涵蓋 Cython 程式設計的所有細節,在本節中,我們只涵
蓋一些基礎,來幫助你開始使用 Cython
Cython 實作了幾乎所有的 Python,但有 Cython 作者無意修補的四個細微
差異(
http://docs.cython.org/en/latest/src/userguide/limitations.html
),以及在
目前 Cython 中被視為臭蟲的幾個小差異,而作者也計畫盡快修補它們(在
此列出它們並沒有意義,因為很有可能你讀到這裡時它們已經被修正了)。
所以,Cython 確實是 Python 的一個龐大的子集。更重要的是,Cython
Python ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9789864766819