5 ms·
The need to do that reveals a couple of weaknesses (or more charitably, tradeoffs) of Python: lack of type constraints, and (related) lack of well-defined, inva
by antonvs 9y ago
The need to do that reveals a couple of weaknesses (or more charitably, tradeoffs) of Python: lack of type constraints, and (related) lack of well-defined, invariant interfaces on objects.
- xapata 9y agoTrade-offs indeed. Magic methods indicate the use of interfaces defined by traits rather than formal types. Duck Typing. It's flexible. But you can also see that Guido has been into types lately. He's been pushing the development of mypy and the new optional type system.