This is what's actually going to create the instance, instantiate it, create what the set of variable values are for it.
这个声明在你,创建一个实例的时候,实例化这个实例,然后给这个实例。
And I have actually seen evidence over the years, mercifully, just a small amount of evidence, but there are, in a group like this, always a few students who come in with a really strong background in high school.
这几年我已经见到了实例,令人感激的是,只有小部分人,但在这,像这样的一个小组,总有一些来到我们这的学生,在高中打下了良好的基础。
self First argument by convention is always self, because it has to point to the instance, and then I pass, in this case, another couple of arguments in.
第一个参数往往是,因为它必须指向实例,然后我传入了,在这个例子中。
Again, it's got an initializer, or an instance creator, right there.
跟上次一样,这里有个初始器,或者说是个实例创造器,就在这里。
These are both altogether called attributes of the instance.
因此在一个实例里面,与之相关联的,是方法和域。
If I want to get values back out, p I could in fact simply send to that instance a message, in this case I could say p dot x.
我就是,我刚刚在这里输入的,我得到了一个c,point的实例,如果我想把值取出来,实际上我可以。
应用推荐