2 ms·
Understanding Attributes, Dicts and Slots in Python
- drunkpotato 5y agoNice explanation! I’d add some further reading and practical advice at the end, like using slots=True in dataclasses or attrs classes when higher performance and lower memory usage are required.
- bascodes 5y agoThat's a great idea. I will post an update!