Python Internals

9 videos 9 essays

Videos


How "is" operator is implemented in python?

567 views 31 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?

482 views 18 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?

349 views 12 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?

295 views 28 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?

275 views 17 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?

730 views 32 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

789 views 38 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

1396 views 61 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

1499 views 47 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...

Essays


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 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.

28+ learners

Details →

Free Courses

Designing Microservices

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

17+ learners

Details →

GitHub Outage Dissections

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

67+ learners

Details →

Hash Table Internals

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

25+ learners

Details →

BitTorrent Internals

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

42+ learners

Details →

Topics I talk about

Being a passionate engineer, I love to talk about a wide range of topics, but these are my personal favourites.





  • v13.8.5
  • © Arpit Bhayani, 2022

Powered by this tech stack.