PyCon US 2020 :snake: check more talks! tutorials! and more!.
Open the index.html
inside the slides directory for the slides.
Check the code directory for all the examples from the talk.
Extending Python with C is a technique that many popular modules use for OS-level operations, serialization, performance, and more, but dealing with C code is not simple: you need to take care of memory, understand pointers, and write many lines of code for simple tasks. Luckily for you, there is C++.
Wait! Don't be scared!
I know maybe you heard bad stories and saw complicated pieces of C++ code, but: are you aware of how C++ has been evolving? The latest C++ standards include many goodies that smell a bit of Python, and I will show them to you.
During this talk, you will learn how to include C++ features into CPython modules, how to create hybrid applications, and even to extend existent C++ applications with Python, making them scriptable.
This talk is intended for developers who are familiar with Python and know basic C, but you don't need to know any C++ to take the most out of it.
This talk is for Intermediate Python developers that are keen to know more details about C++. I expect the audience to be familiar with Python and a bit of C, but not necessarily know how to code in C++ since I will include small C++ snippets that will be explained in detail. Complementary to that, if the audience know a bit of C++, they will follow more easily the code and will take home the possibility to create hybrid applications. I expect the audience to learn how to write their first CPython module with C++, but also to understand how to extend C++ applications with Python
fastglob
a C++ implementation of the glob
module with std::filesystem
fastmath
a C++ implementation of the math.sqrt
function with std::transform
std::
modern features to include in Python modules,