By contrast, duck-typing means that the intricacies of which exact type you are deserializing into is a lot less important in python.
By contrast, duck-typing means that the intricacies of which exact type you are deserializing into is a lot less important in python.
How do you explain the popularity of type hinting in Python then? Type hinting arose _because_ duck typing is horrible for large systems.
I’ve come to Python 20 years ago after a short stint with PHP and I don’t really care if the incoming stuff I have to handle is a list or a tuple (let’s say) as long as it quacks and walks like the proverbial duck.
More generally, you could say Python the original language is the victim of its own success (the same goes for JavaScript in relation to TypeSctipt).
The only not so easy decision is: is it better to store as Unix epoch or as ISO string. That is a tradeoff between compactness and easy searching of date/time ranges.
Am I missing something?