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
Aug 9, 2024 · Fundamentals

What Makes an Object Hashable in Python and How Is Its Hash Computed?

An object is hashable in Python if it is immutable and implements __eq__, allowing it to serve as a dictionary key; the hash value is normally derived from the object's address unless __hash__ is overridden, and equal objects must share identical hash values, influencing dictionary indexing and collision handling.

custom __eq__custom __hash__dictionary
0 likes · 11 min read
What Makes an Object Hashable in Python and How Is Its Hash Computed?
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Jul 30, 2024 · Fundamentals

Inside Python’s List: C‑Level Implementations of Core Methods

This article walks through the CPython source code that defines list’s built‑in methods—append, insert, pop, index, count, remove, reverse, clear, and copy—explaining how each method is wired into the type object, the underlying C logic, time‑complexity characteristics, and common pitfalls such as reference‑count handling and shallow versus deep copying.

Pythonc-implementationdata structures
0 likes · 28 min read
Inside Python’s List: C‑Level Implementations of Core Methods
Satori Komeiji's Programming Classroom
Satori Komeiji's Programming Classroom
Jul 29, 2024 · Fundamentals

Which sequence operations does Python’s list support and how are they implemented?

The article explains the various sequence‑type operations that Python lists provide—concatenation, repetition, indexing, slicing, and element assignment—detailing how each is realized in CPython through the tp_as_sequence and tp_as_mapping slots and the corresponding C functions such as list_concat, list_repeat, list_subscript, and list_ass_subscript.

CPythonc-implementationlist
0 likes · 13 min read
Which sequence operations does Python’s list support and how are they implemented?