Right, so there's that special sentinel value that's back slash zero, which we'll start to see more explicitly now.
对的,这里有一个特殊的值“反斜杠0“,我们等下会更了解它。
Or take this value out of memory, run it through some other simple operation, stick it back in memory.
或者从记忆存储器中取出一个结果,在类似的操作中运行,再插回到存储器中。
But if the loan to value ratio is greater than one, they won't be able to get all the money back.
但如果贷款价值比率大于1,他们就不能追回所有的贷款
It's totally legit to cull a function, get back a value, do nothing with it other than compare it to another value.
挑选一个函数是完全合法的,返回一个值,用它来做些事情而不是用它与其它的值比较。
For example, if you started here and you did all this and you came back here, the average velocity would be zero, because you start and end at the same value of x, you get something; 0 divided by time will still be 0.
例如,如果你从这里开始运动,经过这个过程又回到这里,平均速度就是0,因为初态和末态的位移相同,你得到了什么呢,0除以时间还是0
In there, I want to make this distinction, this nuance: the evaluator is still going to be taking those expressions and using its rules to get a value, but it's not going to print them back out.
在这里,我想要做这么一个,细微差别:运算器依然会,对表达式,进行求值,但是不会,显示结果值。
If I want to get out right now the versions of these things, I can ask what's the value of c p 1 x, and it returns it back out.
你可以在那里看到那些,代表笛卡尔坐标点的东西,如果我想要得到现在,这个类的版本的东西的话。
It's using its set of rules to deduce the value and print them back out.
计算器用自己的规则,去计算出结果来并返回。
That's Hicks's insight and it comes back then to Hicks's book, Value and Capital, in 1939.
以上就是希克斯的观点,他于1939年将其写入《资产价值》中
They only need to have values if you care GetInt about getting something back from them, get int, swap you care about its value; but swap, I don't want to hear it again.
它们只需要拥有值,如果你关心,它们的返回值,你关心它的返回值,但是,我不想再得到它的返回。
So when I'm done, I'm going to give the value back out. All right?
当它完成计算后,需要返回个值对不对?
Now, I mentioned this other sentinel value a while back.
现在,我刚才提到了这个标记值。
So I can similarly do this, which is going to look strange because it's going to give me the same value back out, but it actually did a slightly different thing.
我也可以通过类似的手段来达到这个目的,这看起来很奇怪,但是会返回相同的值,但是它的实现真的有点不同。
So you're clobbering the value of X and then you can't get back X's value because it's too late.
所以你们清除了X的值,然后你们不能找回X的值了,因为太晚了。
But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
It's perfectly legal in Python to type that in and get the value back out.
正如我所说的,我更希望用一个,我刚刚写的访问器。
it gets me back the value.
那么让我们来做下。
So it does that for us so that you can get away with just knowing the address of the first byte and it will make sure that you know when to stop by including the special value so, in fact, get the string if you type in a three-letter word, we allocate four bytes no matter what because we need an additional byte 0 for this special sentinel value back slash zero at the very end.
它为我们做了这些事情,这样我们就可以,通过第一个字节的地址,它还可以通过包含一个特殊的值,来保证在哪里停止,如果你输入了一个三个字母的单词,就可以获得那个字符串,不管怎样,我们分配四个字节,因为我们在末端需要一个额外的字节,来保存这个特殊的标志值--反斜杠。
I going to come back in a second to how it actually does that, but it basically says, get me x value for p 1, get me the x value for p 2, compare them, just as you would normally.
是一个类的实例,我要去取的这个实例,所关联的x值,我稍后会讲讲实际上,这里是怎么实现的,但是基本上它的意思就是,给我p1的x值。
In either case, I take that value and multiply back by two, if it was even I get back the original number, if it was odd, I'm not going to get back the original number, so I can just check to see if they're the same.
在两种情况中,我都把结果值,再乘以2,如果x是偶数我就,得到了原来的值,如果x是奇数那么就不会得到,原来的值,因此我看看得到的值,和原来的值相等不相等就可以了。
And in Python the expression is, operand, operator, operand, when we're doing simple expressions like this, and if I give it to the interpreter, it gives me back exactly what you'd expect, which is that value. OK?
在Python中表达式就是,运算对象,操作符,运算对象,当我们处理这样的简单表达式的时候,我把表达式传给处理器,处理器给我返回了我想要的结果,对不对?
And so this time when you hand it back, this value, I store it in -- we'll say X, and now we actually have retained the value.
这次当你拿回这个值时,我把它存储在X中,现在我们把这个值保存了。
That's the Python saying, that is a command, that is a specific command to get the value of the expression and print it back out.
这代表着Python告诉我们这是一个命令,这是一个,得到表达式的值,并显示的特殊命令。
Locally x got bound to 3, 3 I added 1 to it, whoop-dee-doo, 4 I get back a 4. But what's the value of x?
这是我想要的对吧?,在局部程序中x被赋值为,我给它加了1,我得到了?
And it treats it as a string, it's simply getting me back 52*7 the value of that string, 52 times 7, rather than the value of it.
这让Python把它当做字符串来对待,他返回给我了,一个字符串的值,而不是这个数的和。
That expression, or that value, or that value, literally gets passed back out of that local environment to the value that comes back out of it. So in particular, none none what's solved returns is a pair.
这个表达或者说值,实际上是从那个局部环境中,输出来付给它的,所以solved返回的是一对值,它可以是一对。
It could be the pair of none, none, it could be the pair of, you know, whatever the answer was that we put up there. That value comes back out and is now available inside the scope of Barnyard. OK. And Barnyard then uses that. Question?
也可以是,你知道,任何我们在这里得到的答案,这个返回的值在Barnyard范围内,就可以使用了,然后Barnyard就使用了这个值,有什么问题吗?
应用推荐