Python Internals

9 videos 9 essays

Videos


How "is" operator is implemented in python?

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

348 views 16 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?

284 views 10 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?

276 views 26 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?

232 views 16 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?

620 views 29 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

654 views 34 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

1133 views 57 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

1169 views 44 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.


System Design Masterclass

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

Enrolled by 700+ learners

Details →

Designing Microservices

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

Enrolled by 17+ learners

Details →

GitHub Outage Dissections

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

Enrolled by 67+ learners

Details →

Hash Table Internals

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

Enrolled by 25+ learners

Details →

BitTorrent Internals

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

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




Arpit's Newsletter read by 17000+ engineers

🔥 Thrice a week, in your inbox, an essay about system design, distributed systems, microservices, programming languages internals, or a deep dive on some super-clever algorithm, or just a few tips on building highly scalable distributed systems.



  • v12.4.4
  • © Arpit Bhayani, 2022

Powered by this tech stack.