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 . 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++ .
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