3 ms·
I'd argue that's not object-oriented programming. You are using Python's class mechanism, but that's where the OOness ends. The types themselves are immutable
by ben509 6y ago
I'd argue that's not object-oriented programming.
You are using Python's class mechanism, but that's where the OOness ends. The types themselves are immutable value types, carrying no state and reacting to no messages, and they don't exploit a class hierarchy beyond having a common "Number" class. The "methods" don't even behave like methods, e.g. __add__(self, other) has special wiring so it obscures which side of the addition is "self".
That's very different than a classic OO scheme like a UI toolkit.
- blt 6y agoTrue!