So for example I defined p, remember back over here, as a Cartesian point, but I can actually ask for its polar form.
我可以要求返回它的极坐标形式,这里对我是可访问的,好,这很棒,请再记另外一个为什么。
as a student just visiting and I liked it very much, so.
只是个访问的学生,我非常喜欢,就这样的。
I was visiting Harvard and MIT in Cambridge and I rented a house and this guy was next door.
我在剑桥市的哈佛和麻省理工访问时,在校外租房,这人恰好是我邻居
I'd really like to have that modularity that says, I'm only going to get access to the values, not by calling their names, but by calling some specific method to get access to their names.
这样我们就丢掉了代码的模块化,我很希望代码有这样的模块化:,我访问变量的值,不是通过直接调用它们的名字,而是通过调用某个可以,访问这些变量名的方法来访问。
And I might add that, today's program is part one of the two part program with Joshua.
另外我补充一点,这次的访问分为两部分,今天只是第一部分。
I mean we haven't, we don't really have a second version which is constantly... So I guess for most of last school year I just worked on scaling and kind of trying to make it keep up with the increasing load and trying to make it so that we can expand more, adding more schools.
说实话,我们从来没有,第二个版本。,我记得,在上一学年大部分时间里,我都在致力于扩大网站规模,这样是为了应对,不断增长的访问量,我试着完成目标,这样就能吸引更多学校。
I have constant time access which is great, but I paid a price, which is I had to use up some space.
我的访问时间现在是常数级别,这个非常的棒,但是我也付出了代价,不得不使用更多的空间,在整数的例子中。
So p dot Cartesian is a kind of accessor, it's getting access to the data.
这就是为什么,我想要使用访问器的原因。
It's perfectly legal in Python to type that in and get the value back out.
正如我所说的,我更希望用一个,我刚刚写的访问器。
That is to say, I'm going to go back to a node I've already visited.
也就是说我将要,返回我访问过的节点。
That is basically saying, given some collection of data, I want to have again a looping mechanism, where now my process is, walk through this, the collection one element at a time. And for that, we have a particular construct, called a FOR loop.
现在我的过程就是,通过一个个访问这个集合中,的元素的方式,来遍历这个集合,为了达到这个目的,我们有一个特定的结构,成为FOR循环。
应用推荐