Users Guide
Contents:
- Language Basics
- Extension Types
- Introduction
- Static Attributes
- Dynamic Attributes
- Type declarations
- Extension types and None
- Special methods
- Properties
- Subclassing
- C methods
- Forward-declaring extension types
- Fast instantiation
- Instantiation from existing C/C++ pointers
- Making extension types weak-referenceable
- Controlling deallocation and garbage collection in CPython
- Controlling pickling
- Public and external extension types
- Public extension types
- Special Methods of Extension Types
- Sharing Declarations Between Cython Modules
- Interfacing with External C Code
- Source Files and Compilation
- Early Binding for Speed
- Using C++ in Cython
- Fused Types (Templates)
- Porting Cython code to PyPy
- Limitations
- Differences between Cython and Pyrex
- Python 3 Support
- Conditional expressions “x if b else y”
- cdef inline
- Assignment on declaration (e.g. “cdef int spam = 5”)
- ‘by’ expression in for loop (e.g. “for i from 0 <= i < 10 by 2”)
- Boolean int type (e.g. it acts like a c int, but coerces to/from python as a boolean)
- Executable class bodies
- cpdef functions
- Automatic range conversion
- More friendly type casting
- Optional arguments in cdef/cpdef functions
- Function pointers in structs
- C++ Exception handling
- Synonyms
- Source code encoding
- Automatic
typecheck
- From future directives
- Pure Python mode
- Typed Memoryviews
- Implementing the buffer protocol
- Using Parallelism
- Debugging your Cython program
- Cython for NumPy users
- Pythran as a Numpy backend