擅长:python、mysql、java
<p>您应该研究如何实现Python的<a href="http://docs.python.org/2/reference/datamodel.html#emulating-container-types" rel="nofollow">special iterator methods</a>。你知道吗</p>
<p>另外,请注意,您不应该将方法命名为<code>__work__</code>,因为它使用了magic method语法,但实际上并不是真正的magic方法。你知道吗</p>