3 ms·
Am I correct in thinking that duck tying and type hinting are not mutually exclusive? Type hinting is not enforced at runtime, so we are still free to pass arou
by adamcharnock 10y ago
Am I correct in thinking that duck tying and type hinting are not mutually exclusive? Type hinting is not enforced at runtime, so we are still free to pass around whatever we like as long as it behaves as expected.
- shawabawa3 10y agoCorrect, although it kind of defeats the point of typing if you ignore type errors. There is however an Any type which you can use for things you don't need enforced