In this tutorial, I show you how you can add your own custom functionality to the CPython interpreter. Being an open source programming language implementation, CPython (the reference implementation for the Python spec, and the most popular) is a prime candidate for hacking and adding your own code. Specifically, I show you how to detect when Python decides to resize the memory buffer internally backing a list, to show why append operations have an amortized O(1) cost.
Link to the CPython interpreter repo: github.com/python/cpython
Негізгі бет Ғылым және технология CPython - Hacking in your own functionality
Пікірлер: 39