Notice the form of it, it's just the name of the class followed by open paren, close paren, treating it like a function.
我该怎么来使用类呢?,好,我可以像调用方法,一样调用类,你可以在下面看到,创建一个名为。
Are there any non-science-oriented courses in MIT?
在麻省理工学院,有没有非科学类的课程呢?
Right now, I still have the problem that those classes, those instances of classes, are exposed.
就是这些类,这些类的实例,都是暴露的,我这么说什么意思呢?
If food has addictive properties, and we'll discuss this in the class, then is this the sort of thing that should get regulated by government?
如果食品具有成瘾性,我们会在这门课里讨论,关于这类食品,是否也应该受到政府管制呢
And then should it surprise us that that's the kind of person who would call a perfect stranger on the telephone and write a sexy story and give it to them? Right?
我们是否应该感到吃惊呢,正是这类人会为给一个陌生人打电话,并为对方写一个性感小故事?
Right now it's got that second key word there called pass, which is just Python's way of saying there's an empty body in here.
现在我在完善它的一个简单部分,但是首先,类是用来干什么的呢?,把类认为是可以创建一个。
Whenever I think about how to build an interesting program, and I hope whenever you think about it, the first thing I think about is, what are the classes I might want to have, what are the types?
无论我何时,去想怎样建立一个有趣的程序,你们每次做这种思考的时候,你们想得第一件事,就是我应该要有什么类呢,它们是什么类型的呢?
Well, how do these two humans differ in their relationship to food?
这两类人与食物的关系有什么不同呢
I don't have to put an init in, but it's again, usually a good idea to put that in originally.
类定义内做些什么其他的东西呢?,好,在两个例子里,我都有init声明。
应用推荐