# 用戶指南
> 原文: [http://docs.cython.org/en/latest/src/userguide/index.html](http://docs.cython.org/en/latest/src/userguide/index.html)
內容:
* [語言基礎知識](language_basics.html)
* [聲明數據類型](language_basics.html#declaring-data-types)
* [C 變量和類型定義](language_basics.html#c-variable-and-type-definitions)
* [Python 函數與 C 函數](language_basics.html#python-functions-vs-c-functions)
* [自動類型轉換](language_basics.html#automatic-type-conversions)
* [陳述和表達](language_basics.html#statements-and-expressions)
* [Cython 文件類型](language_basics.html#cython-file-types)
* [條件編譯](language_basics.html#conditional-compilation)
* [擴展類型](extension_types.html)
* [簡介](extension_types.html#introduction)
* [靜態屬性](extension_types.html#static-attributes)
* [動態屬性](extension_types.html#dynamic-attributes)
* [類型聲明](extension_types.html#type-declarations)
* [擴展類型和無](extension_types.html#extension-types-and-none)
* [特殊方法](extension_types.html#special-methods)
* [屬性](extension_types.html#properties)
* [子類](extension_types.html#subclassing)
* [C 方法](extension_types.html#c-methods)
* [前向聲明擴展類型](extension_types.html#forward-declaring-extension-types)
* [快速實例化](extension_types.html#fast-instantiation)
* [來自現有 C / C ++指針的實例化](extension_types.html#instantiation-from-existing-c-c-pointers)
* [使擴展類型弱引用](extension_types.html#making-extension-types-weak-referenceable)
* [控制 CPython](extension_types.html#controlling-deallocation-and-garbage-collection-in-cpython) 中的釋放和垃圾收集
* [控制酸洗](extension_types.html#controlling-pickling)
* [公共和外部擴展類型](extension_types.html#public-and-external-extension-types)
* [公共擴展類型](extension_types.html#public-extension-types)
* [擴展類型的特殊方法](special_methods.html)
* [聲明](special_methods.html#declaration)
* [Docstrings](special_methods.html#docstrings)
* [初始化方法:`__cinit__()`和`__init__()`](special_methods.html#initialisation-methods-cinit-and-init)
* [終結方法:`__dealloc__()`](special_methods.html#finalization-method-dealloc)
* [算術方法](special_methods.html#arithmetic-methods)
* [豐富的比較](special_methods.html#rich-comparisons)
* [`__next__()`方法](special_methods.html#the-next-method)
* [特殊方法表](special_methods.html#special-method-table)
* [在 Cython 模塊之間共享聲明](sharing_declarations.html)
* [定義和實施文件](sharing_declarations.html#definition-and-implementation-files)
* [定義文件包含什么](sharing_declarations.html#what-a-definition-file-contains)
* [實施文件包含什么](sharing_declarations.html#what-an-implementation-file-contains)
* [cimport 聲明](sharing_declarations.html#the-cimport-statement)
* [分享 C 函數](sharing_declarations.html#sharing-c-functions)
* [分享擴展類型](sharing_declarations.html#sharing-extension-types)
* [與外部 C 代碼接口](external_C_code.html)
* [外部聲明](external_C_code.html#external-declarations)
* [使用 C](external_C_code.html#using-cython-declarations-from-c) 的 Cython 聲明
* [源文件和編譯](source_files_and_compilation.html)
* [從命令行編譯](source_files_and_compilation.html#compiling-from-the-command-line)
* [基本 setup.py](source_files_and_compilation.html#basic-setup-py)
* [包中的多個 Cython 文件](source_files_and_compilation.html#multiple-cython-files-in-a-package)
* [集成多個模塊](source_files_and_compilation.html#integrating-multiple-modules)
* [使用`pyximport`](source_files_and_compilation.html#compiling-with-pyximport) 進行編譯
* [使用`cython.inline`](source_files_and_compilation.html#compiling-with-cython-inline) 進行編譯
* [與 Sage](source_files_and_compilation.html#compiling-with-sage) 一起編譯
* [使用 Jupyter 筆記本進行編譯](source_files_and_compilation.html#compiling-with-a-jupyter-notebook)
* [編譯器指令](source_files_and_compilation.html#compiler-directives)
* [早期綁定速度](early_binding_for_speed.html)
* [在 Cython 中使用 C ++](wrapping_CPlusPlus.html)
* [概述](wrapping_CPlusPlus.html#overview)
* [一個簡單的教程](wrapping_CPlusPlus.html#a-simple-tutorial)
* [編制和導入](wrapping_CPlusPlus.html#compilation-and-importing)
* [高級 C ++功能](wrapping_CPlusPlus.html#advanced-c-features)
* [RTTI 和 typeid()](wrapping_CPlusPlus.html#rtti-and-typeid)
* [在 setup.py](wrapping_CPlusPlus.html#specify-c-language-in-setup-py) 中指定 C ++語言
* [警告和限制](wrapping_CPlusPlus.html#caveats-and-limitations)
* [融合類型(模板)](fusedtypes.html)
* [快速入門](fusedtypes.html#quickstart)
* [聲明融合類型](fusedtypes.html#declaring-fused-types)
* [使用融合類型](fusedtypes.html#using-fused-types)
* [選擇專業化](fusedtypes.html#selecting-specializations)
* [內置熔斷類型](fusedtypes.html#built-in-fused-types)
* [熔鑄函數](fusedtypes.html#casting-fused-functions)
* [類型檢查專業化](fusedtypes.html#type-checking-specializations)
* [條件 GIL 獲取/釋放](fusedtypes.html#conditional-gil-acquiring-releasing)
* [__signatures__](fusedtypes.html#signatures)
* [將 Cython 代碼移植到 PyPy](pypy.html)
* [參考計數](pypy.html#reference-counts)
* [物件壽命](pypy.html#object-lifetime)
* [借用參考和數據指針](pypy.html#borrowed-references-and-data-pointers)
* [內置類型,插槽和字段](pypy.html#builtin-types-slots-and-fields)
* [GIL 處理](pypy.html#gil-handling)
* [效率](pypy.html#efficiency)
* [已知問題](pypy.html#known-problems)
* [錯誤和崩潰](pypy.html#bugs-and-crashes)
* [限制](limitations.html)
* [嵌套元組參數解包](limitations.html#nested-tuple-argument-unpacking)
* [檢查支持](limitations.html#inspect-support)
* [堆疊幀](limitations.html#stack-frames)
* [推斷文字的身份與平等](limitations.html#identity-vs-equality-for-inferred-literals)
* [Cython 和派熱克斯之間的差異](pyrex_differences.html)
* [Python 3 支持](pyrex_differences.html#python-3-support)
* [條件表達式“x if b else y”](pyrex_differences.html#conditional-expressions-x-if-b-else-y)
* [cdef inline](pyrex_differences.html#cdef-inline)
* [聲明轉讓(例如“cdef int spam = 5”)](pyrex_differences.html#assignment-on-declaration-e-g-cdef-int-spam-5)
* for 循環中的['by'表達式(例如“for i from 0< = i< 10 by 2”)](pyrex_differences.html#by-expression-in-for-loop-e-g-for-i-from-0-i-10-by-2)
* [Boolean int 類型(例如,它的行為類似于 c int,但是作為布爾值強制轉換為/來自 python)](pyrex_differences.html#boolean-int-type-e-g-it-acts-like-a-c-int-but-coerces-to-from-python-as-a-boolean)
* [可執行類主體](pyrex_differences.html#executable-class-bodies)
* [cpdef 函數](pyrex_differences.html#cpdef-functions)
* [自動量程轉換](pyrex_differences.html#automatic-range-conversion)
* [更友好型鑄造](pyrex_differences.html#more-friendly-type-casting)
* [cdef / cpdef 函數中的可選參數](pyrex_differences.html#optional-arguments-in-cdef-cpdef-functions)
* [結構中的函數指針](pyrex_differences.html#function-pointers-in-structs)
* [C ++異常處理](pyrex_differences.html#c-exception-handling)
* [同義詞](pyrex_differences.html#synonyms)
* [源代碼編碼](pyrex_differences.html#source-code-encoding)
* [自動`typecheck`](pyrex_differences.html#automatic-typecheck)
* [來自 __future__ 指令](pyrex_differences.html#from-future-directives)
* [純 Python 模式](pyrex_differences.html#pure-python-mode)
* [類型記憶視圖](memoryviews.html)
* [快速入門](memoryviews.html#quickstart)
* [使用記憶庫視圖](memoryviews.html#using-memoryviews)
* [與舊緩沖支持](memoryviews.html#comparison-to-the-old-buffer-support)的比較
* [Python 緩沖支持](memoryviews.html#python-buffer-support)
* [內存布局](memoryviews.html#memory-layout)
* [Memoryviews 和 GIL](memoryviews.html#memoryviews-and-the-gil)
* [Memoryview 對象和 Cython 陣列](memoryviews.html#memoryview-objects-and-cython-arrays)
* [Cython 陣列](memoryviews.html#cython-arrays)
* [Python 數組模塊](memoryviews.html#cpython-array-module)
* [強制對 NumPy](memoryviews.html#coercion-to-numpy)
* [無切片](memoryviews.html#none-slices)
* [通過指針](memoryviews.html#pass-data-from-a-c-function-via-pointer)從 C 函數傳遞數據
* [實施緩沖協議](buffer.html)
* [矩陣類](buffer.html#a-matrix-class)
* [內存安全和引用計數](buffer.html#memory-safety-and-reference-counting)
* [旗幟](buffer.html#flags)
* [參考文獻](buffer.html#references)
* [使用并行](parallelism.html)
* [編制](parallelism.html#compiling)
* [突破循環](parallelism.html#breaking-out-of-loops)
* [使用 OpenMP 函數](parallelism.html#using-openmp-functions)
* [調試你的 Cython 程序](debugging.html)
* [運行調試器](debugging.html#running-the-debugger)
* [使用調試器](debugging.html#using-the-debugger)
* [便利功能](debugging.html#convenience-functions)
* [配置調試器](debugging.html#configuring-the-debugger)
* [Cython for NumPy 用戶](numpy_tutorial.html)
* [Cython 一覽](numpy_tutorial.html#cython-at-a-glance)
* [您的 Cython 環境](numpy_tutorial.html#your-cython-environment)
* [安裝](numpy_tutorial.html#installation)
* [手動編譯](numpy_tutorial.html#manual-compilation)
* [第一個 Cython 程序](numpy_tutorial.html#the-first-cython-program)
* [添加類型](numpy_tutorial.html#adding-types)
* [內存視圖的高效索引](numpy_tutorial.html#efficient-indexing-with-memoryviews)
* [進一步調整索引](numpy_tutorial.html#tuning-indexing-further)
* [將 NumPy 數組聲明為連續](numpy_tutorial.html#declaring-the-numpy-arrays-as-contiguous)
* [使功能更清晰](numpy_tutorial.html#making-the-function-cleaner)
* [更通用的代碼](numpy_tutorial.html#more-generic-code)
* [使用多線程](numpy_tutorial.html#using-multiple-threads)
* [從哪里開始?](numpy_tutorial.html#where-to-go-from-here)
* [Pythran 作為 Numpy 后端](numpy_pythran.html)
* [distutils](numpy_pythran.html#usage-example-with-distutils) 的用法示例
## 指數和表格
* [指數](../../genindex.html)
* [模塊索引](../../py-modindex.html)
* [搜索頁](../../search.html)
- Cython 3.0 中文文檔
- 入門
- Cython - 概述
- 安裝 Cython
- 構建 Cython 代碼
- 通過靜態類型更快的代碼
- Tutorials
- 基礎教程
- 調用 C 函數
- 使用 C 庫
- 擴展類型(又名.cdef 類)
- pxd 文件
- Caveats
- Profiling
- Unicode 和傳遞字符串
- 內存分配
- 純 Python 模式
- 使用 NumPy
- 使用 Python 數組
- 進一步閱讀
- 相關工作
- 附錄:在 Windows 上安裝 MinGW
- 用戶指南
- 語言基礎
- 擴展類型
- 擴展類型的特殊方法
- 在 Cython 模塊之間共享聲明
- 與外部 C 代碼連接
- 源文件和編譯
- 早期綁定速度
- 在 Cython 中使用 C ++
- 融合類型(模板)
- 將 Cython 代碼移植到 PyPy
- Limitations
- Cython 和 Pyrex 之間的區別
- 鍵入的內存視圖
- 實現緩沖協議
- 使用并行性
- 調試你的 Cython 程序
- 用于 NumPy 用戶的 Cython
- Pythran 作為 Numpy 后端