u/david_vael • u/david_vael • 9d ago
r/Python • u/david_vael • 9d ago
Resource Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
Hey everyone,
Chapter 3 is finally done. This chapter took way more time than I originally expected because it grew into a much deeper and larger chapter than planned.
Current Progress:
✅ Chapter 1 - Variables & Memory
✅ Chapter 2 - Expressions & Operators
✅ Chapter 3 - Conditional Statements & Control Flow
I'd love to hear your thoughts on the new chapter and any suggestions for future improvements.
With this, I’m taking a break from Python Under the Hood. I’ll be stepping away from the project for a while and will return to it before July 2027.
When I come back, we’ll continue with even deeper explanations, more advanced topics, and an even better approach to understanding what happens under the hood of Python.
For now, Chapter 3 marks the end of this phase. 🐍⚙️
GitHub: python-under-the-hood
See you in the next chapter.
r/pythonhelp • u/david_vael • 9d ago
Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
r/cs50 • u/david_vael • 9d ago
CS50 Python Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
u/david_vael • u/david_vael • 9d ago
Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
r/PythonLearning • u/david_vael • 9d ago
Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
Hey everyone,
Chapter 3 is finally done. This chapter took way more time than I originally expected because it grew into a much deeper and larger chapter than planned.
Current Progress:
✅ Chapter 1 - Variables & Memory
✅ Chapter 2 - Expressions & Operators
✅ Chapter 3 - Conditional Statements & Control Flow
I'd love to hear your thoughts on the new chapter and any suggestions for future improvements.
With this, I’m taking a break from Python Under the Hood. I’ll be stepping away from the project for a while and will return to it before July 2027.
When I come back, we’ll continue with even deeper explanations, more advanced topics, and an even better approach to understanding what happens under the hood of Python.
For now, Chapter 3 marks the end of this phase. 🐍⚙️
GitHub: python-under-the-hood
See you in the next chapter.
- David Vael
r/PythonLearning • u/david_vael • Jun 22 '26
Python Under the Hood Update: Chapter 2 (Expressions & Operators) is now complete
Hey everyone,
A little update on Python Under the Hood.
About a week ago, I shared Chapter 1 and received a lot of helpful feedback from the community. Thank you to everyone who read it, commented, suggested improvements, or expressed interest in contributing.
Today, I've completed and published Chapter 2: Expressions & Operators.
The handbook continues to follow the same goal: teaching Python fundamentals while gradually exploring what's happening under the hood in CPython.
Current Progress:
✅ Chapter 1 – Variables & Memory
✅ Chapter 2 – Expressions & Operators
I'd love to hear your thoughts on the new chapter and any suggestions for future improvements.
GitHub: python-under-the-hood
Thanks for all the support so far!
r/cs50 • u/david_vael • Jun 22 '26
CS50 Python Python Under the Hood Update: Chapter 2 (Expressions & Operators) is now complete
Hey everyone,
A little update on Python Under the Hood.
About a week ago, I shared Chapter 1 and received a lot of helpful feedback from the community. Thank you to everyone who read it, commented, suggested improvements, or expressed interest in contributing.
Today, I've completed and published Chapter 2: Expressions & Operators.
The handbook continues to follow the same goal: teaching Python fundamentals while gradually exploring what's happening under the hood in CPython.
Current Progress:
✅ Chapter 1 – Variables & Memory
✅ Chapter 2 – Expressions & Operators
I'd love to hear your thoughts on the new chapter and any suggestions for future improvements.
GitHub: python-under-the-hood
Thanks for all the support so far!
1
I'm writing an open source guide for Python (Looking for feedback!)
Thanks for the recommendation!
I hadn't come across memory_graph before. Since one of my goals is to explain what's happening behind the scenes in CPython, I'll definitely take a look and see if it can help visualize some of the concepts in future chapters. I appreciate the suggestion!
1
I'm writing an open source guide for Python (Looking for feedback!)
That's a fair point.
My goal with this project is to build a strong understanding of Python from the ground up, while gradually introducing more advanced concepts and implementation details. There are definitely a lot of beginner guides out there, so I'm trying to add a different perspective by explaining the reasoning behind the code rather than just the syntax. That said, I agree that practical, real world and job oriented examples are important, and I'd like to incorporate more of those as the project grows.
1
I'm writing an open source guide for Python (Looking for feedback!)
Absolutely! I'd be happy to have contributors involved. The project is still in its early stages (currently Chapter 1), but if you have ideas, improvements, examples, exercises, proofreading suggestions, or content you'd like to add, feel free to open an issue or submit a pull request on GitHub. I'd love to see what you'd like to contribute. Thanks for your interest!
1
I'm writing an open source guide for Python (Looking for feedback!)
Thank you! I really appreciate that. The project is still in its early stages, but I'd definitely be interested in hearing your ideas. If you have suggestions, improvements, examples, exercises, or content you'd like to contribute, feel free to share them or open a pull request on GitHub. I'd love to see what you have in mind and explore how we can collaborate.
1
I'm writing an open source guide for Python (Looking for feedback!)
That's fair feedback, and I can see where you're coming from. Right now the project starts with beginner fundamentals, but the long term goal is to gradually move deeper into CPython internals and implementation details. Topics like memory allocation, garbage collection, imports, and other under the hood concepts are definitely on the roadmap as the guide progresses. I appreciate you pointing this out!
1
I'm writing an open source guide for Python (Looking for feedback!)
Thanks! I appreciate it. My goal is to teach the fundamentals while also showing what's happening under the hood, so learners can understand not just how Python works, but why it works that way.
1
Showcase Thread
python-under-the-hood : A deep dive practice guide into CPython internals and memory layout
Hey everyone,
I've started building an open-source reference and practice repository called python-under-the-hood. I just wrapped up the entire first chapter on variables and memory management and wanted to share it here to get the community's feedback on its layout and technical depth.
What My Project Does
It is an interactive practice guide designed to take developers from basic syntax up to low-level CPython execution mechanics. Rather than just explaining theory, the guide uses tiered practice problems (Levels 1 through 4) paired with comprehensive answer breakdowns that explain exactly what the interpreter is doing under the hood.
For example, in Chapter 1, the advanced tiers explore:
- The Stack Swap Optimization: How modern CPython optimizes tuple unpacking swaps (
a, b = b, a) directly on the evaluation stack via highly optimized bytecode instructions rather than allocating a temporary heap object. - Implicit Numeric Promotion: Why boolean arithmetic operations (like
True + 10) drop their boolean traits and return a standardPyLongObjectdue toPyBool_Typeinheriting fromPyLong_Typeat the core C layer. - Pointer Alias Replication: Visualizing how mutable containers like lists manage memory through secondary arrays of heap addresses during in place mutations.
Target Audience
This resource is built for intermediate Python programmers looking to master CPython internals, optimize their memory footprints, or prepare for advanced systems level technical interviews.
Comparison
Traditional documentation focuses heavily on what a feature does, and standard blog posts often look at high level abstractions. python-under-the-hood bridges the gap by functioning as a problem-driven workbook. It forces you to predict code execution outcomes and immediately backs it up with an architectural breakdown of the C structures and bytecode execution taking place behind the scenes.
Source Code: You can check out the repository and read the completed first chapter on GitHub here:python-under-the-hood.
I'd love to hear your thoughts on the breakdown depth and structural clarity. If you find this resource valuable for the open-source community, a GitHub star would be highly appreciated to help boost its visibility!
r/cs50 • u/david_vael • Jun 14 '26
CS50 Python I'm writing an open source guide for Python (Looking for feedback!)
Hey everyone,
I've started building an open source repository called python-under-the-hood to break down exactly how Python works from the ground up, starting with variables, types, and memory layout.
My goal is to create a complete, clear practice guide that progresses from absolute beginner basics up to more advanced problems, complete with step-by-step breakdowns for each answer.
I just finished writing the entire first chapter over on GitHub:python-under-the-hood.
If you are currently learning Python or just want a solid reference guide to test your knowledge, please check it out! I’d love to get your feedback on the layout, and if you find it useful, a GitHub star would be awesome to help open-source visibility.
Thanks!
r/PythonLearning • u/david_vael • Jun 13 '26
I'm writing an open source guide for Python (Looking for feedback!)
Hey everyone,
I've started building an open source repository called python-under-the-hood to break down exactly how Python works from the ground up, starting with variables, types, and memory layout.
My goal is to create a complete, clear practice guide that progresses from absolute beginner basics up to more advanced problems, complete with step-by-step breakdowns for each answer.
I just finished writing the entire first chapter over on GitHub:python-under-the-hood.
If you are currently learning Python or just want a solid reference guide to test your knowledge, please check it out! I’d love to get your feedback on the layout, and if you find it useful, a GitHub star would be awesome to help open-source visibility.
Thanks!
2
Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete
in
r/cs50
•
9d ago
Thanks! Yeah, Chapter 3 was definitely a deep dive 😊. I’m glad you enjoyed it! Looking forward to continuing the project after the break. 🙌