Python __slots__

• 1 min read

I just learned about this today while going through the python mastery course. Apparently, some good memory optimization can be done by using it in classes.

This answer does a good job explaining how it works.

I’ve not had a need for it yet, but it’s a good thing to keep in mind for when I do end up needing it.

🏷  til , python