3 ms·
> Meanwhile Python, JS and many other weakly typed languages will happily add an integer and a float, maybe even a string and a number without complaints. Actu
by Tade0 5y ago
> Meanwhile Python, JS and many other weakly typed languages will happily add an integer and a float, maybe even a string and a number without complaints.
Actually, that's a type error in Python, hence my question.
- alpaca128 5y agoYes, but that's mostly an exception compared to the rest of Python's type system. Python doesn't care a lot about types in general. Sure, it's not quite as lenient as JS, but JS is a pretty extreme case - you won't find many other languages that'll happily do an addition of an object and an array.