Yury Selivanov Profile picture
Co-founder & CEO of @edgedatabase • Python core developer • PSF fellow • async/await • asyncio • uvloop • asyncpg
otaria123 Profile picture Learning in Public - Coding - DataSci Profile picture 3 subscribed
Apr 20, 2022 9 tweets 4 min read
WOW.

Bloomberg finally opensourced memray—a new versatile memory profile for Python. Can't way to use it.

Thread 👇 1. It's fully open source (Apache 2), grab it here: github.com/bloomberg/memr…
Aug 12, 2019 15 tweets 4 min read
Let's talk about Python metaclasses. 🎩✨ Many think they are magical things that mere mortals should never use. That's not quite true, although in many cases metaclasses can needlessly complicate things. Beware.

Read the thread! 👇👇👇 Note: the purpose of this thread is to show how to use metaclasses via a few examples. There are a few simplifications here and there for the sake of brevity. If you want to understand how things work I suggest to start with the official documentation: docs.python.org/3/reference/da…
Jan 29, 2019 19 tweets 5 min read
Let's talk about immutability. Python, unlike languages like Clojure, Erlang, and Rust is built entirely around mutable state. I'm going to try to convince you that immutability is awesome and can be effectively used in Python today.

Thread 👇 1. If an object is immutable it means that its state cannot be changed after it is created. For instance, in Python you can't change a character in a string, or reassign an element of a tuple. Python ships with a few immutable datatypes: str, bytes, tuple/namedtuple, frozenset.