Pablo Galindo Salgado Profile picture
Python Steering Council and core developer. Python 3.10/3.11 release manager. @ThePSF Fellow. Deals with black holes and parsers. Attracts linker problems.
Oct 31, 2022 9 tweets 2 min read
Python 3.12 will add support for the Linux perf profiler! 🔥🔥 Perf is one of the most powerful and performant profilers for Linux that allows getting a ridiculous amount of information such as CPU counters, cache misses, context switching and much more. 🧵👇 This means that since Python 3.12, perf will be able to "see" python calls and show them in the stack. This allows you to generate very easily these kinds of flame graphs that have both C/C++/Rust code and Python code. Image
Mar 2, 2019 4 tweets 1 min read
The oldest piece of CPython, the parser generator (pgen) has been retired and replaced with a new version! 🐍🖥️🥳

The parser generator was the first piece written for Python 29 years ago. It generates the parser rules (in the form of DFAs) from the grammar specification file. The new pgen, based on lib2to3/pgen2 is completely written in Python and has much better error reporting: For example, if a grammar rule with multiple productions is not LL(1) it will indicate which terminal collides in the first sets of the productions.