3 ms·
> you need a class where natural, convenient, consumer-friendly use of a data structure should leverage features like operators and standard protocols that rely
by kyllo 7y ago
> you need a class where natural, convenient, consumer-friendly use of a data structure should leverage features like operators and standard protocols that rely on the existence of particular methods (often special methods.)
I understand and I can't disagree, this just seems much, much narrower in scope than what classes are used for in typical Python code I see every day. Which is perhaps due to influence from other languages like Java/C++ etc.