Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Monkey-Patching CPython with Ctypes to Conform to Party Doctrine

EuroPython Conference via YouTube

Overview

Explore the intricacies of CPython internals in this 30-minute EuroPython Conference talk. Dive into a unique challenge of modifying the value of "2 + 2" to equal 5 at runtime using only Python and the ctypes module. Gain insights into the Python data model, CPython compilation process, and execution by the virtual stack machine. Learn about object and type representation in memory, reference counting, and the transformation of Python scripts into abstract syntax trees. Discover how to monkeypatch integer addition without requiring C programming knowledge. The talk covers topics such as peephole optimization, memory protection, and provides an opportunity for questions. Suitable for those interested in understanding the inner workings of CPython and exploring unconventional programming techniques.

Syllabus

Intro
Background
Ctypes
Peephole optimization
Atlantic hiring
Questions
MProtect
What kept you going
Repositories
People Optimizer

Taught by

EuroPython Conference

Reviews

Start your review of Monkey-Patching CPython with Ctypes to Conform to Party Doctrine

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.