I didn't expect it to do this. If you understand why it did what it did, you're half way there.
这样运行的啊,如果你能弄明白为什么,它这么运行,你已经完成了差不多一半了。
We'll do this relatively quickly but I hope I won't rush it like I did last time.
我们会相对讲快一点,但我希望这次我不会讲得像上次那样急促
It didn't do this little optimization I did over here.
他在这里没有加上,我在那儿做的小改进。
I can't rely on Professor Guttag if I give this- if this code to him, I can't rely on him to type in a float. Actually I can, because he's a smart guy, but in general, I can't rely on the user-- I wouldn't do it right to see if you did.
当Guttag使用这段代码的时候-,我不能相信他一定会输入一个浮点数,实际上我能因为他很聪明,但是总体上来讲,别相信用户一定会按照规则来-,我会故意做错来试试你的程序的。
And I have to admit, I did the standard thing you do every time you run across something you don't know about, you go to Wikipedia.
额外的名为self的变量,那么什么是self呢?,我需要承认,我做了大家当碰到,不会的问题都会做的标准的事情。
应用推荐