Today read the 40th chapter of LPTHW after the enlightened, the original has been dull, do not understand the definition and use of the class, there is not quite understand the definition of self.
class MyStuff (object): def __init__ "and nowa thousand years between"def Apple: print
"I AM classy apples! "
Say the class and the Mini module is similar, then for the class, there must be an import-like concept. The concept name is "instance (instance)". This is just a acting knowledgeable, it means "create". When you "instantiate" a class, you get an object. The way to instantiate is to call a class as if it were called a function: thing = MyStuff () thing.apple () print Thing.tangerine
__init__'Frank'='Frank ' You know exactly what this refers to is the attribute Self.cheese of the instance.
Don't quite understand the definition of super in class inheritance.
Read the comments on the Internet more and more confused.
Lpthw stupid way to learn Python 40 Chapter Class