Chris Angelico <ros...@gmail.com> wrote: > "Type safety" means many different things to different people. What > Python has is untyped variables, and hierarchically typed objects. > It's impossible to accidentally treat an integer as a float, and have > junk data [1]. It's impossible to accidentally call a base class's > method when you ought to have called the overriding method in the > subclass, which is a risk in C++ [2].
Exactly. I have no hopes that those who claim Python lacks type safety will understand this, however. > If you mistakenly pass a list to > a function that was expecting an integer, that function will *know* > that it got a list, because objects in Python are rigidly typed. And then there is nothing that prevents the function from raising a TypeError. Sturla -- https://mail.python.org/mailman/listinfo/python-list