And in fact, under type checking, different languages sometimes fall on a spectrum from weak to strong typing.
实际上,在类型检查的下面,不同的语言会对应着,从弱到强的一个定型范围。
First of all, having read in that value, I can check to see, is it of the right type?
首先,读一下这个值,我们可以来检查看看是不是正确的类型?
The second thing I want to highlight is, that what's going on, is that Python is doing some type checking.
我想强调的第二件事情是,这里发生的是,是Python做了一些类型检查的工作。
It's going to do a lot of type checking for you before it actually passes things back.
它会在将输入值进行计算之前,做很多类型检查。
So I actually want to have type checking as much as I can early on.
因此我会在尽可能早的地方去,做一个类型检查。
Which basically says, how much type checking do they do?
这也就意味着,它们会做多少类型检查?
It does not check the types of its arguments at all.
它根本不检查它的,参数的类型。
It caught the error, because it checked the types of the operands before it applied things and it says, I'm going to stop.
它捕捉到了错误,因为它在,进行运算之前检查了运算对象的类型,然后Python意识到,应该停止了。
Now if you look at that list, there is actually something I didn't seem to check, which is, I said I wanted a float stored in hyp.
看下上面的清单,实际上我还有一些东西忘了检查,也就是说hyp中存储的,应该是浮点数类型。
I love Lisp, but Lisp is certainly in the category of a very weakly typed language.
我爱Lisp,但是Lisp当然,是属于在类型检查比较弱的语言一类。
应用推荐