Satori Komeiji's Programming Classroom
Author

Satori Komeiji's Programming Classroom

Python and Rust developer; I write about any topics you're interested in. Follow me! (#^.^#)

33
Articles
0
Likes
0
Views
0
Comments
Recent Articles

Latest from Satori Komeiji's Programming Classroom

33 recent articles
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Oct 18, 2024 · Fundamentals

How Python’s Virtual Machine Executes Bytecode: Step‑by‑Step Process

This article explains how the Python interpreter, after runtime initialization, creates a stack frame, invokes a series of C functions such as PyEval_EvalCode, _PyEval_Vector, and _PyEval_EvalFrameDefault to traverse and execute bytecode, and details the underlying runtime stack structures and macro APIs that support instruction evaluation.

C APIPyEvalPython
0 likes · 25 min read
How Python’s Virtual Machine Executes Bytecode: Step‑by‑Step Process
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Sep 18, 2024 · Fundamentals

How Python Implements Iterators: From __iter__ to __next__

This article explains Python's iterator protocol by showing how objects become iterable through __iter__, how the built‑in iter function creates iterator objects, the CPython internals of PyObject_GetIter, and how the __next__ method advances elements, with concrete code examples and source‑level snippets.

CPythonIterableIterator
0 likes · 16 min read
How Python Implements Iterators: From __iter__ to __next__
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Aug 29, 2024 · Fundamentals

How Python Dictionaries Resize: The Full Expansion Process

The article explains Python's dict resizing mechanism, detailing when the hash table grows (when used entries reach two‑thirds of capacity), how the new size is chosen as the smallest power‑of‑two ≥ ma_used × 3, and the exact steps the interpreter takes to reallocate and rebuild the underlying key and entry arrays.

Pythoncombined-tabledict
0 likes · 12 min read
How Python Dictionaries Resize: The Full Expansion Process