4 ms·
Duck typing is borderline psychotic. Is it a number? Is it not a number? What's the logarithm of an hour?
by thanatropism 13y ago
Duck typing is borderline psychotic. Is it a number? Is it not a number? What's the logarithm of an hour?
- anon4 13y ago> What is the logarithm of an hour? Well, depends. If you try to pass a datetime.time object to the math.log function, you get TypeError: a float is required On the other hand, if you store your hour as a number, then it works just fine. It's still not meaningful, mind.
- yxhuvud 13y agoIt is not duck typing that is psychotic, but automatic conversion between different types.