Fix python3 iterator

Python 3 iterators has `__next__` magic method instead of `next` in case of Python 2.
http://python3porting.com/differences.html#next