Python Internals

9 videos 9 essays


How "is" operator is implemented in python?

755 views 35 likes 2021-05-31

In this video, we find out the internals of "is" operator in Python. We go through the CPython source code and answer ho...

How id() function is implemented in python?

716 views 21 likes 2021-05-24

How is `id` function implemented in Python? In this video, we explore the internals of `id` function in Python and find...

How python compares a float and an int objects?

472 views 14 likes 2021-05-13

How python internally performs the comparison of a float and an integer value? We find this out in this video. Compari...

How python optimizes integers?

385 views 30 likes 2021-05-06

In this video, we answer, How python optimizes integers? Does it cache them? We go through the CPython source code to fi...

How python implements chained comparison operators?

368 views 21 likes 2021-04-28

In this essay, we explore how python evaluates chained comparison operators. We dive deep into the code and answer the f...

How python optimizes strings using String Interning?

1134 views 50 likes 2021-04-13

In this video, we dive deep into CPython and find out how Python optimizes strings. The optimization we will be going th...

Changing python grammar to support standalone walrus assignments

1105 views 46 likes 2021-04-08

In this video, we alter the Python grammar and make an invalid syntax valid. We alter grammar and allow the Walrus opera...

Setting up cpython locally and making your first change

2128 views 78 likes 2021-04-04

In this video, we set up CPython, build our binary, and make our first "Hello, World!" change. CPython Github Repositor...

Series Introduction: The Honest Python

2471 views 62 likes 2021-04-03

The Honest Python is a series in which we dissect certain features, behaviors, and not-so-obvious outputs by diving deep...


Chained Comparison Operators in Python

275 reads 2021-04-27

In this essay, we find how chained comparison expressions are evaluated, understand how short-circuit evaluations happen...

The Weird Walrus

2377 reads 2021-03-29

In this essay, we alter the Python Grammar and allow it run Assignment Expressions without any parenthesis....

Constant Folding in Python

3917 reads 2021-01-10

Every programming language aims to be performant and Python is no exception. In this essay, we dive deep into Python int...

String Interning in Python

1480 reads 2020-12-20

Every programming language aims to be performant and Python is no exception. In this essay, we dive deep into Python int...

Making Python Integers Iterable

1790 reads 2020-06-14

In Python, Integers are not iterables but we can make them iterable by implementing __iter__ function. In this essay, we...

Integer Caching in Python

1824 reads 2020-05-17

To gain a performance boost and avoid reallocation of frequently used integers, Python creates singleton instances of sm...

Function Overloading in Python

12359 reads 2020-02-07

Python natively does not support function overloading - having multiple functions with the same name. Today we see how w...

Super Long Integers in Python

3584 reads 2020-01-10

Python must be doing something beautiful internally to support super long integers and today we find out what's under th...

Changing Python

1121 reads 2020-01-03

I changed the Python's source code and made addition incorrect and unpredictable. The addition operation will internally...

Be a better engineer

A set of courses designed to make you a better engineer and excel at your career; no-fluff, pure engineering.

Paid Courses

System Design for Beginners

A masterclass that helps early engineers and product managers become great at designing scalable systems.

180+ learners

Details →

System Design Masterclass

A masterclass that helps you become great at designing scalable, fault-tolerant, and highly available systems.

1000+ learners

Details →

Redis Internals

Learn internals of Redis by re-implementing some of the core features in Golang.

98+ learners

Details →

Free Courses

Designing Microservices

A free playlist to help you understand Microservices and their high-level patterns in depth.

823+ learners

Details →

GitHub Outage Dissections

A free playlist to help you learn core engineering from outages that happened at GitHub.

651+ learners

Details →

Hash Table Internals

A free playlist to help you understand the internal workings and construction of Hash Tables.

1027+ learners

Details →

BitTorrent Internals

A free playlist to help you understand the algorithms and strategies that power P2P networks and BitTorrent.

692+ learners

Details →