参考:https://docs.python.org/2/tutorial/classes.html
class MyClass:
"""A simple example class"""
i = 12345
def f(self):
return 'hello world'
调用属性:MyClass.i
调用函数:MyClass.f
打印注释:MyClass.__doc__
实例化: x=MyClass()
, 其实调用了默认函数__init__()
x.i,x.f,x.__doc__()