# 初始化方法
def __init__(self):
# 直接呼叫, representation
def __repr__(self):
# 使用print會呼叫
def __str__(self):
# 迭代方法
def __iter__(self):
ex.
- for i in xrange(1000): pass
#返回迭代對象
# 初始化方法
def __init__(self):
# 直接呼叫, representation
def __repr__(self):
# 使用print會呼叫
def __str__(self):
# 迭代方法
def __iter__(self):
ex.
- for i in xrange(1000): pass
#返回迭代對象