3 ms·
There isn't really a "downside" in a strict sense; there are just trade-offs. The biggest one I run into is that __slots__ does not play well with multi-inheri
by gshulegaard 7y ago
There isn't really a "downside" in a strict sense; there are just trade-offs.
The biggest one I run into is that __slots__ does not play well with multi-inheritance:
https://stackoverflow.com/questions/472000/usage-of-slots https://stackoverflow.com/questions/472000/usage-of-slots
Also, slots somewhat contributes to obfuscation since slotted objects don't work in the exact same ways as regular objects do so developers may run into weird stack traces they might not immediately recognize.
- stirfrykitty 7y ago>> developers may run into weird stack traces they might not immediately recognize Truth. To me anyway, debugging code is massively harder than writing it in the first place. Nothing worse than trying to fish out some odd issue that plagues you after spending two hours writing some code, and then 4 hours sorting it out.