- Learning Cython Programming(Second Edition)
- Philip Herron
- 210字
- 2021-07-16 09:45:26
Chapter 2. Understanding Cython
As I mentioned previously, there are a number of methods of using Cython. As the basics are very familiar to any Python programmer, it's important to review the linking models before getting into the programming language. This is what drives the design of applications when using Cython.
Next, we will get more familiar with the Cython programming language constructs, namely, the distinction between cdef
and cpdef
. Then, we will look at getting the most out of Cython by interfacing directly with native C types. Later in this book, we will see that it's possible to use native C++ STL container types. This is where you will gain the optimizations in execution, as no Python runtime is required to work with native types.
Finally, we will see how easy it is to work with callbacks to and from C and Python code. This is an interesting technique whereby you can offload logic from C code to Python.
Therefore, in this chapter, we will be diving into the following topics:
- Linking models
- Cython keyword – cdef
- Typedef and function pointers
- The public keyword
- Keyword cpdef
- Logging from C/C++ into Python
- Using Python ConfigParser from C/C++
- Callbacks from Python to C/C++
- Cython PXD
- Integration with build systems
- DB2 V9權威指南
- Python快樂編程:人工智能深度學習基礎
- 零基礎學Scratch少兒編程:小學課本中的Scratch創意編程
- 深入淺出Java虛擬機:JVM原理與實戰
- 趣學Python算法100例
- R語言游戲數據分析與挖掘
- Java從入門到精通(第4版)
- Interactive Applications Using Matplotlib
- PLC編程及應用實戰
- MATLAB 2020從入門到精通
- 計算機應用技能實訓教程
- Machine Learning for Developers
- Unity Android Game Development by Example Beginner's Guide
- Mastering JavaScript
- Python網絡爬蟲實例教程(視頻講解版)