In this video we are going to explore BYTECODE(opcode) from ceval.c for simple question?
Why and how we see this ‘int’ ibject is not iterable error? How is it checked behind the scene?
If you can master the bytecode — you can easily learn what is your code doing internally.
This video is a simple intro to CPython’s
compiler part — from Tokenization — Abstract Syntax Tree — and compiling to bytecodes.
For sake of simplicity most of the details were omitted — but it is highly recommended to watch to this video.
*Again This is not a full and complete description of the topic.*
In this video we are going to explore the bool type implementation in Python, what is True & False and how to make changes to CPython source code in order to change bool type behavior.
Basically bool is sub-type of integer…
In this short video we are going to finalize the NoneType exploration in CPython.
We are going to add some useless changes to None object such as returnin True from __bool__() call or returning integer type for NoneType type call.
The code changes are here:
In this video we are going to explore CPython source code and NoneType implementation internally.
As a bonus we are using GDB to create NoneType objects using Python/C API. After this video we are ready to change None object to do the most useless things.
In this video we are going to further add extra useless feature to CPython source code — at the end of the video we will have __len__ and len() support for Integer type in Python.
It will always simply return 0.
We do not need this feature at all but we want it right now :)
You can see necessary code changes from here:
*Again those shown things are not for best practice or for contribution, the pure goal is to learn something new by doing something wrong*
In this video we are going to explore how the list type was created in CPython and how to create list object using Python C/API call.
The topic is interesting because we are going to use this information to add __len__() support to integer type in our 4th video.
Note: *again the ideas and cases are not shown as best practice approach*
In this video, we are going to explore how to use debugger(GDB) and our very own Python 3.9 version to sum 2 integers and then print it to console using internal Python/C API.
We will learn:
* How to start Python interpreter within debugger?
* Explore various integer type methods and how to call them directly from debugger?
* How to sum 2 integers and understand what is actually happens internally.
Azerbaijan Python User Group lead — True Pythonista. Golang Engineer. Bug hunter by nature