But there's actually hidden in there an important element, and that is, when I create an instance, I have to be able to get access to the things that characterize that instance.
也就是,当我创建了一个实例,我应该能够获得那些特性化,这个实例的东西,我的意思不是说它们是想法,或者情绪之类的。
I've got and init that says, when you create an instance, here's what you do.
我并不需要一定要有init声明,但是这是,再说一次,通常来说把init声明一开始。
Well, basically because it was a design choice when the creators of Python decided to create the language, they basically said, we're always going to have an explicit pointer to the instance.
好,基本上来说这是因为,这是当Python的创造者,决定创造这门语言的时候,的一个设计决定,他们主要的说了说,我们要有一个明确的,指向实例的指针。
应用推荐