I’m looking to learn about this language from a technical level, and any searches I do on today’s search engines is just going to return guides to writing Python code, which is not what I want.
I understand how C++ works. For example, I know that virtual functions are stored as a trap table in an object’s instance, and the function is wrapped around something that decodes that trap table from this
object instance.
I’m wondering if there’s something that goes into that level of technicality with python. For example, I would want to know how function declarations (and re-declarations) work in python. Is the bytecode stored as a heap object which can be freed just as a regular heap object? Is it a map of strings within the current stack context? How does creating a thread handle it?
Do you mean function definitions? They are executable statements after all. Yes the Python environment is just a bunch of nested dictionaries. Whether there is bytecode is up to the implementation. If you want to understand how CPython works, the source code is not terribly mysterious if you know C. You will want to read the API document first.
For the language itself, the reference manuals are reasonably good.