- 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
- PWA入門與實踐
- ASP.NET MVC4框架揭秘
- Python高級機器學習
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- WebRTC技術詳解:從0到1構建多人視頻會議系統
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Learning Apache Cassandra
- Statistical Application Development with R and Python(Second Edition)
- 一本書講透Java線程:原理與實踐
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- 鴻蒙OS應用編程實戰
- Learning Nessus for Penetration Testing
- 樹莓派開發從零開始學:超好玩的智能小硬件制作書
- micro:bit軟件指南
- 微服務設計