Python classes: __slots__, slots, and object layout

Python __slots__ are useful for saving memory when you have a large number of small objects whose attributes are known ahead of time. In this video we learn about __slots__, what slots actually are and how they work. ― mCoding with James Murphy () Source code: Slots docs: #slots Descriptor docs: #descriptors SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! Feeling generous but don’t have a Patreon? Donate via PayPal! (No sign up needed.) Want to donate crypto? Check out the rest of my supported donations on my website! Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G, Pieter G, Krisztian M, Sigmanificient BE
Back to Top