<div dir="ltr"><div>Dear <a href="http://python.org">python.org</a> documentation team,<br><br>The method that should be defined under Iterator Class should be __next__() or next(). <br><br>Problem: In case __next__() method is defined python under user defined Iterator class, interpreter gives following error:<br>
<i>TypeError: instance has no next() method</i><br><br>Resolution: The problem is resolved when __next__() is renamed to next().<br><br></div><div>PS: My version of python Python 2.7.3<br><br></div><div>Regards,<br></div>
<div>Vishal<br></div></div>