条件代码类型 condition key type
最终目标代码类型设定 Target Setting
用类代替类型码 ReplaceType Code with Class
用子类代替类型码 Replace Type Code with Subclasses
上面的代码类型 Type the Code Above
包装类型代码 PACKAGES KIND CODE ; PackageTypeCode ; Type of packages
以类取代类型码 Replace Type Code with Class
以子类取代类型码 Replace Type Code with Subclasses ; ReplaceTypeCodewithSubclasses ; Replace Type Code with Subclass
类型代码 Type Code ; byClass
代码类型——封装python程序的元素。
Code types — Encapsulate the elements of your Python program.
项目是 OpenNTF 上最复杂的代码类型。
Projects are the most sophisticated type of code on OpenNTF.
从清单6中可以看出,我们再次利用泛型来使所有这些代码类型安全。
As you can see in Listing 6, generics are once again leveraged to make all of this code type safe.
Because I might have written some code in which I'm expecting that integer particular variable to have an integer value.
因为我可能写了一些代码,来把一些,变量的类型,指定为。
If somewhere later on in the code it shifts to string, I might not be manipulating that and getting actual values out, but not what I wanted, and it's going to be really hard for me to chase it back.
然后后面的一些代码,把变量类型变为了字符串,我可能不会通过实际操作,去取得实际的变量的类型,但是这并不是我想要的类型,而且对我来说把类型,变回去也很困难。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
应用推荐