Because I could've built that in, it says if you change the value of this thing, by the way you need to change recompute those other values in order to make this hold up.
我想要大家通过定义好的方法,来改变实例的值了,因为我可以把这个功能,内置到方法里面去,它的意思就是如果,你改变一个值。
They are instances of a class, and associated with that class is a set of methods.
它们是同一个类的实例,与这个类相关联的是一个方法集,因此例如,我可以说。
I think of data hiding as basically saying, one can only access instance values, or, we'll call them that, instance values through defined methods.
一个人仅仅可以访问实例变量,或者,我们可以这么来说,通过定义好的方法,来访问实例的变量。
These are both altogether called attributes of the instance.
因此在一个实例里面,与之相关联的,是方法和域。
These are instances of a class, and associated with that class are a set of methods things that I can deal with.
但是Python的基本思想是相同的,这是一些一个类的实例,这个类关联了一个方法集,我可以做的一些操作。
应用推荐