OOP
OOP
Classes
class <name>: <suite> # 当类语句执行时,该 suite 被执行。class Clown: """An illustration of a class statement. This class is not useful. >>> Clown.nose # 被立即执行了 'big and red' >>> Clown.dance() 'No thanks' """ nose = 'big and red' def dance(): return 'No thanks'
Object Construction
method
Attributes(属性)
Methods 和 Functions
Class Attributes
Last updated